summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-08-23 19:26:16 +0300
committerThomas Voss <mail@thomasvoss.com> 2023-08-23 19:26:16 +0300
commit7a992d8a919976664d8d53b94db19e9fb5862f46 (patch)
treed5b9623c2f69583f7e48c7bb13b8a27a32cb3852 /.config
parent910e2fcc3870b9deeeb20fb7171f6d9804f88b03 (diff)
eww: Use readonly
Diffstat (limited to '.config')
-rwxr-xr-x.config/eww/scripts/volume-listener4
1 files changed, 3 insertions, 1 deletions
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="