fix volumesh for mpd
This commit is contained in:
parent
d4555904fb
commit
822e0138dd
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue