1
0
Fork 0
dotfiles/.local/bin/statusbar/sb-volume
2022-08-23 19:34:38 +02:00

17 lines
413 B
Bash
Executable file

#!/bin/sh
# Prints the current volume or ﱝ if muted.
[ "$(pamixer --get-mute)" = true ] && echo "ﱝ" && exit
vol="$(pamixer --get-volume)"
if [ "$vol" -gt "70" ]; then
icon=""
elif [ "$vol" -gt "30" ]; then
icon=""
elif [ "$vol" -gt "0" ]; then
icon=""
elif [ "$vol" -eq "0" ]; then
icon=""
else
echo " \033[11m\033[10m  " && exit
fi
printf "\033[11m%s\033[10m %s" "$icon" "$vol"