[Sharing] A command line tool to switch audio device and toggle bluetooth device

Github repo: https://github.com/noonchen/BTAudioSwitch

I spent a week to learn objective-c and created this simple tool for my apple headphone preset.

No afraid, you can still use it to switch audio devices and toggle Bluetooth devices (just like the one that BTT offers), but I added a function to show an alert if the user types the wrong device name (It happens to some users of the AirPods preset😂).

For anyone who is interested in this tool → Download from Github release

The following is from the ReadMe of this repo:


`/path/to/BTAudioSwitch -switchOnly -devName="MacBook Pro Speakers"`

Set MacBook Pro Speakers as the audio input/output device, if there's no input device has such name, then audio input device is not changed.

If the device is not found, an alert will show up and tell you the available audio devices in your mac.

`/path/to/BTAudioSwitch -toggleOnly -devName="Bluetooth Keyboard"`

Toggle the connection of Bluetooth Keyboard.

If the device is not paired before, an alert will show up and tell you the paired Bluetooth devices in your mac.

FYI, you can get the name of your audio device in the Sound panel of System Preferences.

Well, I don't have the device to test AirPlay though, if anything not working as expected, plz leave a comment.

@Noon_Chen apologies for such a basic question, but how do I add this to Better Touch Tool? I downloaded the BTAudioSwitch file, but don't know what to do next.

Thanks in advance for your help!