configuration/local/bin/sound_control.sh

16 lines
353 B
Bash
Raw Normal View History

2014-12-19 00:26:04 +01:00
#!/bin/bash
command="${1:=toggle}"
current="$(amixer get Master | sed -n '/%/s/.*\[\(.*\)%\].*/\1/p' | head -1)"
case $command in
toggle) amixer set Master toggle ;;
down) amixer set Master "$((current - 5))%" ;;
up) amixer set Master "$((current + 5))%" ;;
*) notify-send "learn to volume" ;;
esac
2014-12-21 22:40:14 +01:00
sound_notification.sh