diff --git a/scripts/track_volume b/scripts/track_volume index 0155bf9..7d81600 100755 --- a/scripts/track_volume +++ b/scripts/track_volume @@ -1,7 +1,11 @@ #!/bin/sh +poll() { + pamixer --get-volume | grep -E '^[0-9]+$' +} + pactl subscribe | while read -r ;do case "$REPLY" in - *change*) pamixer --get-volume | grep -E '^[0-9]+$';; + *change*) poll ;; esac done