diff --git a/user/scripts/volumesh b/user/scripts/volumesh index 355c26a..f4d3158 100755 --- a/user/scripts/volumesh +++ b/user/scripts/volumesh @@ -1,5 +1,7 @@ #!/bin/sh +set -xe + # depends on: awk, pactl, pacmd, notify-send MAX_VOL=150 @@ -72,7 +74,13 @@ is_muted_mpd() { env LC_ALL=C mpc status | grep '\[paused\]' 1>/dev/null } change_vol_mpd() { - mpc vol "${1}${2}" &>/dev/null + case $1 in + d) + op="-";; + i) + op="+";; + esac + mpc vol "${op}${2}" &>/dev/null round_vol mpc vol "${newvol}" &>/dev/null }