Browse Source

Add wifi and iface i3block, add network.sh, moved touchscreen.sh

master
Riyyi 7 years ago
parent
commit
ebce1698eb
  1. 8
      .config/i3/blocks
  2. 2
      .config/i3/config
  3. 2
      .config/zsh/.zshrc
  4. 29
      .scripts/network.sh
  5. 0
      .scripts/touchscreen.sh
  6. 4
      README.md
  7. 4
      etc/netctl/eth0-dhcp

8
.config/i3/blocks

@ -49,22 +49,18 @@ signal=2
# If the instance is not specified, use the interface used for default route.
# The address can be forced to IPv4 or IPv6 with -4 or -6 switches.
[wifi]
label=
command=$HOME/.scripts/wm/wifi.sh
#instance=wlp3s0
interval=10
separator=true
[iface]
label=
command=$HOME/.scripts/wm/iface.sh
#instance=wlan0
#color=#00FF00
interval=10
separator=true
#[bandwidth]
#instance=eth0
#interval=5
# Battery indicator
#
# The battery instance defaults to 0.

2
.config/i3/config

@ -204,7 +204,7 @@ bindsym --release Print exec scrot -e "mv \$f $HOME/Pictures/screen_captures/"
bindsym --release Shift+Print exec scrot -s -e "mv \$f $HOME/Pictures/screen_captures/" # Selection
bindsym --release $mod+Print exec scrot -u -e "mv \$f $HOME/Pictures/screen_captures/" # Focused window
# Touchscreen toggle
bindsym $mod+F7 exec $HOME/.scripts/wm/touchscreen.sh
bindsym $mod+F7 exec $HOME/.scripts/touchscreen.sh
# Window rules
smart_gaps on

2
.config/zsh/.zshrc

@ -89,7 +89,7 @@ alias gl="git log --graph --abbrev-commit --decorate --format=format:'%C(bold bl
# Laptop
alias offtouchpad='sudo rmmod i2c_hid'
alias ontouchpad='sudo modprobe i2c_hid'
alias homenetwork='sudo netctl start wlan0-merlin-router5GHz'
alias nw="$HOME/.scripts/network.sh"
# Other
source $ZDOTDIR/.zshrc_extended

29
.scripts/network.sh

@ -0,0 +1,29 @@
#!/bin/sh
WIRELESS="wlan0"
WIRED="eth0"
PROFILE="eth0-dhcp"
if [ -z "$1" ] || [ -z "$2" ]; then
exit;
fi
# Enable/disable wireless
if [ "$1" = "w" ] || [ "$1" = "$WIRELESS" ]; then
if [ "$2" = "1" ]; then
sudo ip link set $WIRELESS up
else
sudo ip link set $WIRELESS down
fi
fi
# Enable/disable wired
if [ "$1" = "e" ] || [ "$1" = "$WIRED" ]; then
sudo netctl stop $PROFILE
sudo ip link set $WIRED down
if [ "$2" = "1" ]; then
sudo netctl start $PROFILE
fi
fi

0
.scripts/wm/touchscreen.sh → .scripts/touchscreen.sh

4
README.md

@ -160,3 +160,7 @@ Mail gpg:
gpg --decrypt <backup.pgp> | gpg --import
gpg --search-keys <email address>
Network:
systemctl enable netctl-auto@wlan0.service

4
etc/netctl/eth0-dhcp

@ -0,0 +1,4 @@
Description='A basic dhcp ethernet connection'
Interface=eth0
Connection=ethernet
IP=dhcp
Loading…
Cancel
Save