xmonad/xmobar/volume.sh
2024-08-29 21:00:10 -04:00

14 lines
401 B
Bash
Executable file

#!/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