22 lines
374 B
Bash
Executable File
22 lines
374 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# 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=""
|
|
elif [ "$vol" -eq "0" ]; then
|
|
icon=""
|
|
else
|
|
echo " " && exit
|
|
fi
|
|
|
|
echo "$icon $vol%"
|