From a412ce9c78cddd4f8438adaac89eac81024a3a2e Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Mon, 18 Mar 2024 18:55:40 +0100 Subject: cycle_pa_sinks: fix bug w/ several names --- cycle_pa_sinks | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cycle_pa_sinks') diff --git a/cycle_pa_sinks b/cycle_pa_sinks index a45ba15..63c8a48 100755 --- a/cycle_pa_sinks +++ b/cycle_pa_sinks @@ -6,7 +6,7 @@ # Usage: ./cycle_pa_sinks ################################################################################ -new_sink=$(pacmd list-sinks | grep -E "index|device.product.name" | tee /dev/stdout | grep -m1 -A3 "* index" | tail -2) +new_sink=$(pacmd list-sinks | awk '/index/{print; i=1} i&&/device.product.name/{print; i=0}' | tee /dev/stdout | grep -m1 -A3 "* index" | tail -2) new_sink_idx=$(echo "$new_sink" | head -n1 | cut -c12-) new_sink_name=$(echo "$new_sink" | tail -n1 | cut -f2 -d'"') -- cgit v1.2.3