neodotfiles/user/.config/awesome/ui/widgets/volume
Clay Gomera eedd491e51 updated
2022-12-07 23:13:08 -04:00

14 lines
339 B
Bash
Executable file

#!/bin/bash
# Prints the current volume or 🔇 if muted.
[ "$(pamixer --get-mute)" = true ] && echo " " && exit
vol="$(pamixer --get-volume)"
if [ "$vol" -gt "50" ]; then
icon=""
elif [ "$vol" -gt "10" ]; then
icon=""
elif [ "$vol" -gt "0" ]; then
icon=""
else
echo "  " && exit
fi
echo -e "$icon $vol%"