From 822e0138ddca150dca9ca3a647f39af5f4a1617d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 15 Aug 2022 11:11:50 -0300 Subject: [PATCH] fix volumesh for mpd --- user/scripts/volumesh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 }