An Alfred workflow for setting the input / output audio device.
- SwitchAudioSource -
brew install switchaudio-osx
- jq -
brew install jq
Download the latest version of the workflow from here.
When you import the workflow into Alfred, the import screen will display a list of environment workflow variables that are available to the workflow:
SwitchAudioSource_path
- The path to theSwitchAudioSource
binaryjq_path
- The path to thejq
binaryconfig_path
- The path to workflow config file
Modify these variables if you have the binaries or config file in a different location.
- Trigger Alfred
- Type
set-audio-in
- Use the up / down key to navigate to the input audio device you want to set
- Press enter to set the input audio device
A notification will be displayed showing which input audio device has been set.
- Trigger Alfred
- Type
set-audio-out
- Use the up / down key to navigate to the input audio device you want to set
- Press enter to set the output audio device
A notification will be displayed showing which output audio device has been set.
To use this action, ensure you have a config file created for this workflow (located at ~/.alfred-switchaudio.json
- This location can be modified by editing the config_path
environment workflow variable):
{
"groups": {
"desktop": {
"title": "Desktop",
"input": "HD Pro Webcam C920",
"output": "Scarlett 2i2 USB"
},
"airpods": {
"title": "AirPods",
"input": "Mike's AirPods Pro",
"output": "Mike's AirPods Pro"
}
}
}
- Trigger Alfred
- Type
set-audio-group
- Use the up / down key to navigate to the audio device group you want to set
- Press enter to set the input and output audio devices associated with the group
A notification will be displayed confirming the audio devices have been set.