Created
April 5, 2018 12:08
-
-
Save dlight/194d403165a9ffe550ec724f91f0c7f1 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/sh | |
if [ -z "$1" ]; then | |
echo "Usage: $0 <sinkId/sinkName>" >&2 | |
echo "Valid sinks:" >&2 | |
pactl list short sinks >&2 | |
exit 1 | |
fi | |
newSink="$1" | |
pactl set-default-sink "$newSink" | |
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 |
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/sh | |
move-pulse alsa_output.pci-0000_00_03.0.hdmi-stereo | |
notify-send -t 100 hdmi |
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/sh | |
move-pulse alsa_output.pci-0000_00_1b.0.analog-stereo | |
notify-send -t 100 laptop-audio |
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/sh | |
move-pulse alsa_output.usb-C-Media_Electronics_Inc._Microsoft_LifeChat_LX-3000-00.analog-stereo | |
notify-send -t 100 ms-headphone |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment