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