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)"
if [ "$vol" -gt "70" ]; then
icon="🔊"
elif [ "$vol" -gt "30" ]; then
icon="🔉"
elif [ "$vol" -gt "0" ]; then
icon="🔈"
icons=("🔈" "🔉" "🔊")
if [ "$vol" -gt "0" ]; then
icon=${icons[((vol / 33))]}
else
echo 🔇 && exit
echo 🔇 && exit
fi
echo "$icon$vol%"