Created
December 20, 2019 17:35
-
-
Save drwahl/6c54892390ee957c0ed83ea7e0ed7162 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -xe | |
allSinks=$(pactl list short sinks | grep -v 'echo-cancel' | awk '{print $1}') | |
currentSink=$(pactl list short sink-inputs | tail -1 | awk '{print $2}') | |
newSink=$(echo $allSinks | tr " " "\n"| grep -v $currentSink) | |
pactl list short sink-inputs|while read stream; do | |
streamId=$(echo $stream|cut '-d ' -f1) | |
echo "moving stream $streamId" | |
pactl move-sink-input "$streamId" "$newSink" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment