From 7a992d8a919976664d8d53b94db19e9fb5862f46 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 23 Aug 2023 19:26:16 +0300 Subject: eww: Use readonly --- .config/eww/scripts/volume-listener | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.config') diff --git a/.config/eww/scripts/volume-listener b/.config/eww/scripts/volume-listener index 9c0368c..640548d 100755 --- a/.config/eww/scripts/volume-listener +++ b/.config/eww/scripts/volume-listener @@ -1,5 +1,7 @@ #!/bin/sh +readonly SINK=@DEFAULT_AUDIO_SINK@ + stdbuf -oL amixer events \ | stdbuf -oL sed 's/event value: //' \ | while IFS= read -r line @@ -10,7 +12,7 @@ stdbuf -oL amixer events \ x=${x%\'} case "$x" in 'Master Playback'*) - wpctl get-volume @DEFAULT_AUDIO_SINK@ \ + wpctl get-volume $SINK \ | awk ' /MUTED/ { print "icon=" -- cgit v1.2.3