aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.local/bin/sb_layout.sh8
-rwxr-xr-x.local/bin/sb_set.sh23
-rwxr-xr-x.local/bin/sb_test.sh2
-rwxr-xr-x.local/bin/sb_volume.sh14
4 files changed, 46 insertions, 1 deletions
diff --git a/.local/bin/sb_layout.sh b/.local/bin/sb_layout.sh
new file mode 100755
index 0000000..9fdeb51
--- /dev/null
+++ b/.local/bin/sb_layout.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+case $BUTTON in
+ # Left mouse click
+ 1) xkb-switch -n ;;
+esac
+
+printf $(xkb-switch -p | tr -d '\n')
diff --git a/.local/bin/sb_set.sh b/.local/bin/sb_set.sh
new file mode 100755
index 0000000..236b856
--- /dev/null
+++ b/.local/bin/sb_set.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+case $1 in
+ -i)
+ amixer -q sset Master 5%+
+ pkill -SIGRTMIN+11 dwmblocks
+ ;;
+
+ -d)
+ amixer -q sset Master 5%-
+ pkill -SIGRTMIN+11 dwmblocks
+ ;;
+
+ -t)
+ amixer -q sset Master toggle
+ pkill -SIGRTMIN+11 dwmblocks
+ ;;
+
+ -n)
+ xkb-switch -n
+ pkill -SIGRTMIN+10 dwmblocks
+ ;;
+esac
diff --git a/.local/bin/sb_test.sh b/.local/bin/sb_test.sh
index 726c618..3d4b5b1 100755
--- a/.local/bin/sb_test.sh
+++ b/.local/bin/sb_test.sh
@@ -17,4 +17,4 @@ case $BUTTON in
5) notify-send "$BUTTON" ;;
esac
-echo "Test"
+printf "Test"
diff --git a/.local/bin/sb_volume.sh b/.local/bin/sb_volume.sh
new file mode 100755
index 0000000..c769ddd
--- /dev/null
+++ b/.local/bin/sb_volume.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+case $BUTTON in
+ # Left mouse click
+ 1) amixer -q sset Master toggle ;;
+
+ # Mouse wheel up
+ 4) amixer -q sset Master 1%+ ;;
+
+ # Mouse wheel down
+ 5) amixer -q sset Master 1%- ;;
+esac
+
+amixer get Master | awk -F'[][]' 'END{ print toupper($(NF-1))": "$2 }'