neodotfiles/user/.config/suckless/dwmblocks/scripts/volume
Clay Gomera 75927f319c Updated
2022-07-01 02:06:16 -04:00

19 lines
346 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="🔈"
else
echo " 🔇 " && exit
fi
echo " $icon $vol% "