I'm one of those who like to have a keyboard shortcut for everything. AirPods auto-switching works better with iOS and iPadOS than it does with my M1 Macbook Air. Also, I dislike having to click Connect every time with the trackpad. I want a keyboard shortcut key that I can press just in case, before joining a Teams call and be sure that the headphones are connected.
I previously had a solution with BetterTouchTool and BluetoothConnector (Homebrew), but it's not reliable with AirPods, because they are kind of always connected. The key was to add a command to actually set the AirPods Max as the sound output. Luckily Homebrew had a solution for that as well: switchaudio-osx.
I'll document the process here in case there are other people here with similar character flaws.
First, install Homebrew. You'll need Xcode for it to work. Install it from the App Store. You'll also need to run:
Then you can:
Here's the command line to connect to the headphones and set them as sound output/input, configured as a shortcut key in BetterTouchTool:
To get the Bluetooth address and the name, run
BetterTouchTool has a nice option to set a HUD overlay that confirms the little script is being executed. I've set my HUD title to the headphones emoji ? and the HUD Detail Text to "Max".
Screenshots with BetterTouchTool settings attached. Hope this helps.
I previously had a solution with BetterTouchTool and BluetoothConnector (Homebrew), but it's not reliable with AirPods, because they are kind of always connected. The key was to add a command to actually set the AirPods Max as the sound output. Luckily Homebrew had a solution for that as well: switchaudio-osx.
I'll document the process here in case there are other people here with similar character flaws.
First, install Homebrew. You'll need Xcode for it to work. Install it from the App Store. You'll also need to run:
to get the command line tools required by Homebrew.sudo xcode-select --install
Then you can:
brew install bluetoothconnector
brew install switchaudio-osx
Here's the command line to connect to the headphones and set them as sound output/input, configured as a shortcut key in BetterTouchTool:
In that, there are two or three things to modify: the Bluetooth address of the headphones, and the name of the headphones inside quotes. If you have an Intel Mac, the path will be /usr/local/bin and not /opt/homebrew/bin./opt/homebrew/bin/BluetoothConnector -c aa-bb-cc-dd-ee-ff && /opt/homebrew/bin/SwitchAudioSource -s "? Max"
To get the Bluetooth address and the name, run
without any options. You'll find your AirPods listed, with their address, and their name too. Yes, mine is "? Max". Emojis do work.BluetoothConnector
BetterTouchTool has a nice option to set a HUD overlay that confirms the little script is being executed. I've set my HUD title to the headphones emoji ? and the HUD Detail Text to "Max".
Screenshots with BetterTouchTool settings attached. Hope this helps.