2022-07-04 21:36:33 +02:00
|
|
|
#!/bin/sh
|
2023-05-24 18:33:43 +02:00
|
|
|
big="\033[11m"
|
|
|
|
reset="\033[0m"
|
|
|
|
|
2022-07-04 21:36:33 +02:00
|
|
|
# Prints the current volume or ﱝ if muted.
|
2023-04-12 11:37:10 +02:00
|
|
|
[ "$(pamixer --get-mute)" = true ] && echo "\e[11mﱝ\e[10m" && exit
|
2022-07-04 21:36:33 +02:00
|
|
|
vol="$(pamixer --get-volume)"
|
|
|
|
|
|
|
|
if [ "$vol" -gt "70" ]; then
|
2022-08-07 12:54:35 +02:00
|
|
|
icon=""
|
2022-07-04 21:36:33 +02:00
|
|
|
elif [ "$vol" -gt "30" ]; then
|
2022-08-07 12:54:35 +02:00
|
|
|
icon=""
|
2022-07-04 21:36:33 +02:00
|
|
|
elif [ "$vol" -gt "0" ]; then
|
2022-08-07 12:54:35 +02:00
|
|
|
icon=""
|
2023-02-07 17:19:53 +01:00
|
|
|
elif [ "$vol" -eq "0" ]; then
|
|
|
|
icon=""
|
2022-07-04 21:36:33 +02:00
|
|
|
else
|
2023-05-24 18:33:43 +02:00
|
|
|
printf "%b%b " "\e[11m" "\e[0m" && exit
|
2022-07-04 21:36:33 +02:00
|
|
|
fi
|
2023-05-24 18:33:43 +02:00
|
|
|
printf "%b" "$big$icon$reset $vol\n"
|