Alfred workflow to quickly switch between audio output devices.
Credit: Switch Audio Input/Output Device using Alfred – AgileAdam.com for the idea, I've just made some icons and packaged it up.
For this to you work, you need to use Homebrew to install switchaudiosource
:
brew install switchaudio-osx
Provides keyword inputs to quickly switch between headphones, speakers, and an external device:
Device | Keyword |
---|---|
Headphones | ash |
Speakers | asp |
External | asx |
Search Outputs | aset |
The first time each is used, it will prompt you to select the audio source for that device and then save it for next time (which may take a few seconds to take affect). The next time it should switch to that device immediately.
NOTE: the macOS multimedia volume controls don't don't seem to affect the volume of external audio devices. To work around this, you will need to install something like SoundSource which will allow you to control audio levels for external devices such as Komplete Audio 6 and Focusrite Scarletts.
Once you've switched to an audio device and it has been saved, if you want to change it to a different device, click the [X]
icon in the top right of the workflow settings to access the Workflow Environment Variants, and delete the value.
Then when using the relevant keyword for that device next time, it should prompt you to select it again and save it.
- Keyword:
aset
Can use this at any time to present a list of all output audio devices currently connected to your system.
Selecting one will swich to that output.
- Keyword:
asel
Can use this at any time to present a list of all audio devices currently connected to your system:
Does not save the selected value.
I have these setup with Karabiner-Elements to fire from a macro-pad:
- Switch to headphones:
alfred://runtrigger/com.beet.alfred_audio_switcher/headphones
- Switch to speakers:
alfred://runtrigger/com.beet.alfred_audio_switcher/speakers