From d4371b880bd9496a4466d2e6e09f0d77f5d2f607 Mon Sep 17 00:00:00 2001 From: imgurbot12 Date: Thu, 28 Mar 2024 09:03:35 -0700 Subject: [PATCH] fix: better pipewire support with slight search mods --- other-plugins/pactl-audio.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/other-plugins/pactl-audio.sh b/other-plugins/pactl-audio.sh index accc1ac..f5544d7 100755 --- a/other-plugins/pactl-audio.sh +++ b/other-plugins/pactl-audio.sh @@ -1,9 +1,10 @@ #!/bin/sh get_sinks() { - sinks=`pactl list sinks | grep -e 'Sink ' -e 'Name: ' -e 'Description: ' | nl -s '>'` + sinks=`pactl list sinks | grep -e 'Sink #' -e 'Name: ' -e 'Description: ' | nl -s '>'` default=`pactl get-default-sink` for i in `seq 1 3 $(echo "$sinks" | wc -l)`; do + echo "$sinks" | grep "$i>" sink=`echo "$sinks" | grep "$i>" | cut -d '#' -f2` name=`echo "$sinks" | grep "$(expr $i + 1)>" | cut -d ':' -f2 | xargs echo -n` desc=`echo "$sinks" | grep "$(expr $i + 2)>" | cut -d ':' -f2 | xargs echo -n`