diff options
-rwxr-xr-x | bspwm/.local/bin/spk-icon | 2 | ||||
-rw-r--r-- | other/acpid/events/jack | 3 | ||||
-rwxr-xr-x | other/acpid/jack.sh | 17 |
3 files changed, 21 insertions, 1 deletions
diff --git a/bspwm/.local/bin/spk-icon b/bspwm/.local/bin/spk-icon index 216fbf4..10a2e7c 100755 --- a/bspwm/.local/bin/spk-icon +++ b/bspwm/.local/bin/spk-icon @@ -1,5 +1,5 @@ if $(pamixer --get-mute) ; then echo ⮝ else -echo ⮟ +cat /tmp/spkicon fi diff --git a/other/acpid/events/jack b/other/acpid/events/jack new file mode 100644 index 0000000..338957c --- /dev/null +++ b/other/acpid/events/jack @@ -0,0 +1,3 @@ +# Pass all events to our one handler script +event=jack/* +action=/etc/acpi/jack.sh %e diff --git a/other/acpid/jack.sh b/other/acpid/jack.sh new file mode 100755 index 0000000..e71d17d --- /dev/null +++ b/other/acpid/jack.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# acpi script that takes an entry for headphone actions + +case "$1" in + jack/headphone) + case "$3" in + plug) + echo "⮜" > /tmp/spkicon + ;; + unplug) + echo "⮟" > /tmp/spkicon + ;; + esac + ;; +esac + +# vim:set ts=4 sw=4 ft=sh et: |