xmonad/xmobar/volume.sh

14 lines
401 B
Bash
Raw Permalink Normal View History

2024-08-29 21:00:10 -04:00
#!/bin/bash
MUTE=$(pulseaudio-ctl full-status | awk '{print $2}')
VOLUME=$(pulseaudio-ctl full-status | awk '{print $1}')
if [ "$MUTE" = "yes" ]; then
echo "<fc=#696B71><fn=3></fn></fc> "
elif [ "$VOLUME" -eq 0 ]; then
echo "<fc=#696B71><fn=3></fn></fc> "
elif [ "$VOLUME" -lt 77 ]; then
echo "<fc=#DFDFDF><fn=3></fn></fc> "
else
echo "<fc=#DFDFDF><fn=3></fn></fc>"
fi