diff --git a/examples/eww-bar/scripts/getvol b/examples/eww-bar/scripts/getvol index 6a95077..5b92a39 100755 --- a/examples/eww-bar/scripts/getvol +++ b/examples/eww-bar/scripts/getvol @@ -1,2 +1,7 @@ #!/bin/sh -amixer -D pulse sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%' | head -1 + +if command -v pactl &>/dev/null; then + pactl get-sink-volume $(pactl get-default-sink) | awk -F '[^0-9]+' '/left:/{print $3}' +else + amixer -D pulse sget Master | awk -F '[^0-9]+' '/Left:/{print $3}' +fi