18 lines
397 B
Bash
Executable File
18 lines
397 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 " " && exit
|
|
fi
|
|
printf "\033[11m%s\033[10m %s" "$icon" "$vol"
|