From 3b2a78935fd6550521f719a10e5b0fceb1ddb350 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 15 Feb 2023 16:31:56 +0100 Subject: Not really but, First commit! --- config/X/xmonad/autostart/getvolume.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 config/X/xmonad/autostart/getvolume.sh (limited to 'config/X/xmonad/autostart/getvolume.sh') 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="" + elif [ $string -gt 49 ] + then + icon="" + elif [ $string -eq 0 ] + then + icon="" + elif [ $string -lt 50 ] + then + icon="" + fi + echo "${string}% $icon" > $HOME/.config/xmobar/scripts/volume-pipe +done -- cgit v1.2.3