configuration/local/bin/sound_control.sh
2014-12-21 22:40:14 +01:00

16 lines
353 B
Bash
Executable File

#!/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
sound_notification.sh