shortened sb-volume code

This commit is contained in:
Rentib 2022-08-09 11:42:18 +02:00
parent 606905268f
commit 3b692f4680

View File

@ -17,14 +17,11 @@ esac
vol="$(pamixer --get-volume)" vol="$(pamixer --get-volume)"
if [ "$vol" -gt "70" ]; then icons=("🔈" "🔉" "🔊")
icon="🔊" if [ "$vol" -gt "0" ]; then
elif [ "$vol" -gt "30" ]; then icon=${icons[((vol / 33))]}
icon="🔉"
elif [ "$vol" -gt "0" ]; then
icon="🔈"
else else
echo 🔇 && exit echo 🔇 && exit
fi fi
echo "$icon$vol%" echo "$icon$vol%"