Closed gileswells closed 1 year ago
@deweller please? I'd try to compile it myself for personal use but I have no idea where to begin on that.
Came here looking for this feature! I'll try to compile @gileswells branch (I'd have to learn how to do that, too!) but in the meantime, I added these commands to my .bashrc
:
local headset_name="Logitech USB Headset"
local internal_speaker="MacBook Pro Speakers"
local internal_mic="MacBook Pro Microphone"
# switch input and output
alias headset='SwitchAudioSource -s "{headset_name}"; SwitchAudioSource -s "{headset_name}" -t input;'
alias speaker='SwitchAudioSource -s "{internal_speaker}"; SwitchAudioSource -s "{internal_mic}" -t input;'
# switch to specified input/output (e.g. `aud h`) or toggle if not specified
function aud() {
if [[ ! -f /usr/local/bin/SwitchAudioSource ]] then
return 1
fi
if [[ -z "$1" ]] then
SwitchAudioSource -n
SwitchAudioSource -n -t input
elif [[ "$1" == "h" ]] then
headset
elif [[ "$1" == "s" ]] then
speaker
fi
}
@earthtone0ne yeah I just run all three under the alias of airpod
. Now that I have Monterey installed I just need to see what keyboard shortcut isn't going to mess with the apps I use and I'll drop that into the Shortcuts app rather than have to drop into terminal.
I can confirm this patch works as intended. M1 MBP; Xcode 13.2.1
Thanks for confirming that this works. I'll check this out and merge this week.
I'll check this out and merge this week.
Thoughts @deweller?
I was always wanting the all feature. Please merge this and kindly publish the build
Full disclosure, I am unsure if this works.
The build succeeds but I haven't dug into figure out where the build outputs to / if it actually does what I hope it will do. This came out of a frustration of my audio switching for output but then not for SMS chimes or for my input mic for Zoom calls.