statusbar-scripts/sb-volume
2023-08-23 19:45:38 +02:00

20 lines
294 B
Bash
Executable File

#!/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"