summaryrefslogtreecommitdiffstats
path: root/bin/sound.sh
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2012-11-28 20:46:57 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2012-11-28 20:46:57 +0100
commit4e773bd7c60dfed11c5a5a8df4115607ea9d523d (patch)
tree2adc287c3b567ceccd33cdaf53670d6413625b91 /bin/sound.sh
parent130dfa760b27a1cfce48f849a01b1f38306bea03 (diff)
downloaddzen2-config-4e773bd7c60dfed11c5a5a8df4115607ea9d523d.tar.gz
dzen2-config-4e773bd7c60dfed11c5a5a8df4115607ea9d523d.tar.xz
dzen2-config-4e773bd7c60dfed11c5a5a8df4115607ea9d523d.zip
sound: replace inotify with dbus notify from pulseaudio
Diffstat (limited to '')
-rw-r--r--bin/sound.sh22
1 files changed, 0 insertions, 22 deletions
diff --git a/bin/sound.sh b/bin/sound.sh
deleted file mode 100644
index 382c461..0000000
--- a/bin/sound.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-function print_mute {
- local stat VOL MUTE
-
- stat=$(amixer -c0 get Master | grep "Front Left:")
- VOL=$(sed 's/^.*\[\(.*\)%\].*$/\1/g' <<< "${stat}")
- MUTE=$(sed 's/^.*\[\([^\[]*\)\]$/\1/g' <<< "${stat}")
-
- if [ "${MUTE}" == "off" -o "${MUTE}" == "0" ]
- then
- echo "^tw()^fg(#FF0000)^i(${HOME}/.dzen2/icons/vol-mute.xbm)"
- else
- echo "^tw()^fg()^i(${HOME}/.dzen2/icons/vol-hi.xbm)"
- fi
-
- echo "$(echo "$VOL" | tail -n 1)" | gdbar -h 6 -w 50 -fg '#999' -bg '#444'
-}
-
-print_mute
-inotifywait -q -m /dev/snd/controlC0 -e ACCESS | while read i
-do
- print_mute
-done