From 8fd285450f3cf6fff2c39149a86e0f111d539294 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Thu, 6 Feb 2020 15:26:22 +0100 Subject: bin/soundswitch: Also move all sink-inputs on global change --- bin/soundswitch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/soundswitch b/bin/soundswitch index 42b6b21..6be88f6 100755 --- a/bin/soundswitch +++ b/bin/soundswitch @@ -48,7 +48,11 @@ if [ -n "${global}" ] then target_sink=$(select_sink) notify-send -a soundswitch "soundswitch: global" "switch to ${target_sink}" + # set new default sink pactl set-default-sink "${target_sink}" + # move all sink-inputs to the new sink + pactl list sink-inputs short | cut -f1 \ + | xargs -i pactl move-sink-input "{}" "${target_sink}" elif [ -n "${focused}" ] then -- cgit 1.4.1