neodotfiles/user/.config/suckless/dwmblocks/scripts/block_volume
Clay Gomera 0d8a88efca updated
2023-06-24 17:25:21 -04:00

14 lines
344 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% "