21 lines
450 B
Bash
Executable File
21 lines
450 B
Bash
Executable File
#!/bin/sh
|
|
big="\033[11m"
|
|
reset="\033[0m"
|
|
|
|
# Prints the current volume or ﱝ if muted.
|
|
[ "$(pamixer --get-mute)" = true ] && echo "\e[11mﱝ\e[10m" && 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
|
|
printf "%b%b " "\e[11m" "\e[0m" && exit
|
|
fi
|
|
printf "%b" "$big$icon$reset $vol\n"
|