Switch all types
OliverJAsh opened this issue · 1 comments
OliverJAsh commented
IIUC, -s
only works on the provided type
, which defaults to output
.
If you want to select a device for all types, you have to run
function switchAllAudio() {
DEVICE=$1
echo Switching all audio to $DEVICE
SwitchAudioSource -t output -s $DEVICE && \
SwitchAudioSource -t input -s $DEVICE && \
SwitchAudioSource -t system -s $DEVICE
}
switchAllAudio "Earphones"
Perhaps we could add a flag to switch all types simultaneously? I rarely want my input to use a different device from the output.
deweller commented
This is a helpful tip. I think your solution is good.
I generally want to stay with the unix philosophy here and keep this utility as a simple building block for solutions like this.