diff options
| author | Robert Günzler <r@gnzler.io> | 2020-02-06 15:26:22 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2020-02-06 15:26:22 +0100 |
| commit | 8fd285450f3cf6fff2c39149a86e0f111d539294 (patch) | |
| tree | 24df7474f2679129b4cf391bb8b59b74c0ea0061 /bin/soundswitch | |
| parent | f4ecb37127526bda31dfacfdd1a421ae5e397021 (diff) | |
bin/soundswitch: Also move all sink-inputs on global change
Diffstat (limited to '')
| -rwxr-xr-x | bin/soundswitch | 4 |
1 files changed, 4 insertions, 0 deletions
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 <i>${target_sink}</i>" + # 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 |