diff options
Diffstat (limited to 'config/X/xmonad/xmonad.disabled/autostart/getvolume.sh')
-rwxr-xr-x | config/X/xmonad/xmonad.disabled/autostart/getvolume.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/config/X/xmonad/xmonad.disabled/autostart/getvolume.sh b/config/X/xmonad/xmonad.disabled/autostart/getvolume.sh new file mode 100755 index 0000000..ee2509e --- /dev/null +++ b/config/X/xmonad/xmonad.disabled/autostart/getvolume.sh @@ -0,0 +1,20 @@ +#!/bin/bash +while true +do + string=$(pamixer --get-volume) + muted=$(pamixer --get-mute) + if [[ "$muted" == "true" ]] + then + icon="<fn=1></fn>" + elif [ $string -gt 49 ] + then + icon="<fn=1></fn>" + elif [ $string -eq 0 ] + then + icon="<fn=1></fn>" + elif [ $string -lt 50 ] + then + icon="<fn=1></fn>" + fi + echo "${string}% $icon" > $HOME/.config/xmobar/scripts/volume-pipe +done |