fix volumesh for mpd

This commit is contained in:
Leonardo Eugênio 2022-08-15 11:11:50 -03:00
parent d4555904fb
commit 822e0138dd

View file

@ -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
}