[status] fix: show volume when muted
This commit is contained in:
parent
094bc994f2
commit
0005eff8a2
@ -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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user