2022-07-27 04:05:59 +00:00
|
|
|
#!/bin/bash
|
2022-07-01 06:06:16 +00:00
|
|
|
# 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="🔈"
|
|
|
|
else
|
|
|
|
echo " 🔇 " && exit
|
|
|
|
fi
|
|
|
|
echo " $icon $vol% "
|