configfiles/scripts/volume.sh

28 lines
482 B
Bash
Raw Normal View History

2015-05-29 21:08:06 +02:00
#!/bin/bash
case $1 in
+)
pamixer --unmute --increase 2
;;
-)
pamixer --unmute --decrease 2
;;
mute)
pamixer --toggle-mute
;;
*)
exit 1
;;
esac
MUTE=$(pamixer --get-mute)
if [ "$MUTE" == "true" ]; then
VOLUME=0
else
VOLUME=$(pamixer --get-volume)
fi
pkill osd_cat
2015-05-29 21:08:06 +02:00
osd_cat --colour=White --shadow 1 --pos bottom --align center --offset 80 --delay=1 -b percentage -P $VOLUME -T "Lautstärke"