statusbar-scripts/sb-volume

20 lines
294 B
Plaintext
Raw Normal View History

2023-08-23 19:45:38 +02:00
#!/bin/sh
# Prints the current volume or 🔇 if muted.
. sb-theme
[ $(pamixer --get-mute) = true ] && echo ﱝ && exit
vol="$(pamixer --get-volume)"
if [ "$vol" -gt "65" ]; then
icon=""
elif [ "$vol" -lt "30" ]; then
icon=""
else
icon=""
fi
display "$icon $vol%" "$1" "$vol"