diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-02-15 16:31:56 +0100 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-02-15 16:47:43 +0100 |
commit | 3b2a78935fd6550521f719a10e5b0fceb1ddb350 (patch) | |
tree | 7c50801d6bb5b7abba3df6352ed43df454a4dbcb /config/X/xmonad/autostart/getvolume.sh |
Not really but, First commit!
Diffstat (limited to 'config/X/xmonad/autostart/getvolume.sh')
-rwxr-xr-x | config/X/xmonad/autostart/getvolume.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/config/X/xmonad/autostart/getvolume.sh b/config/X/xmonad/autostart/getvolume.sh new file mode 100755 index 0000000..ee2509e --- /dev/null +++ b/config/X/xmonad/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 |