aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcycle_pa_sinks2
1 files changed, 1 insertions, 1 deletions
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'"')