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

This commit is contained in:
Riyyi
2018-01-13 18:25:52 +01:00
parent 4092590b41
commit ebce1698eb
8 changed files with 42 additions and 9 deletions
+29
View File
@@ -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
View File
+1 -1
View File
@@ -8,7 +8,7 @@ STEP="5%"
case $BLOCK_BUTTON in
1) pavucontrol ;; # left click, start sound settings
2) amixer -q -D $MIXER sset $INSTANCE 0 unmute ;; # scroll click, set 0
3) amixer -q -D $MIXER sset $INSTANCE toggle ;; # right click, mute/unmute
3) amixer -q -D $MIXER sset $INSTANCE toggle ;; # right click, mute/unmute
4) amixer -q -D $MIXER sset $INSTANCE ${STEP}+ unmute ;; # scroll up, increase
5) amixer -q -D $MIXER sset $INSTANCE ${STEP}- unmute ;; # scroll down, decrease
esac