diff --git a/config/xmobar/scripts/pulsevol.sh b/config/xmobar/scripts/pulsevol.sh new file mode 100755 index 00000000..dc2d6766 --- /dev/null +++ b/config/xmobar/scripts/pulsevol.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +vol=$(pamixer --get-volume) +mute=$(pamixer --get-mute) + +if [ $mute = 'true' ]; then + echo MUTED +else + echo Vol: $vol% +fi diff --git a/config/xmobar/scripts/volume.sh b/config/xmobar/scripts/volume.sh deleted file mode 100755 index abd81b40..00000000 --- a/config/xmobar/scripts/volume.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# Get the maximum volume of any pulseaudio sink channel -# amixer get Master | egrep -o "[0-9]+%" -vol=$(amixer get Master | awk -F'[]%[]' '/%/ {if ($7 == "off") { print "MM" } else { print $2 }}' | head -n 1) - -echo Vol: $vol%