configfiles/scripts/.config/scripts/volume.sh
2015-10-08 10:31:53 +02:00

28 lines
482 B
Bash
Executable file

#!/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
osd_cat --colour=White --shadow 1 --pos bottom --align center --offset 80 --delay=1 -b percentage -P $VOLUME -T "Lautstärke"