[status] fix: show volume when muted

This commit is contained in:
David JULIEN 2022-10-30 23:18:53 +01:00
parent 094bc994f2
commit 0005eff8a2

View File

@ -9,10 +9,12 @@
# @description : volume block for dwmblocks # @description : volume block for dwmblocks
###################################################################### ######################################################################
[ "1" = $(pulsemixer --get-mute) ] && echo " 婢 --- " && exit
vol="$(pulsemixer --get-volume | awk -F " " '{ printf "%d", $1 }')" vol="$(pulsemixer --get-volume | awk -F " " '{ printf "%d", $1 }')"
if [ "1" = $(pulsemixer --get-mute) ]; then
icon="婢"
else
if [ "$vol" -gt "70" ]; then if [ "$vol" -gt "70" ]; then
icon="墳" icon="墳"
elif [ "$vol" -lt "30" ]; then elif [ "$vol" -lt "30" ]; then
@ -20,6 +22,7 @@ elif [ "$vol" -lt "30" ]; then
else else
icon="奔" icon="奔"
fi fi
fi
printf " %s %3d%% " $icon $vol printf " %s %3d%% " $icon $vol