I'm using Boom as an equalizer and a File Audio Boosting on my MBP when using built-in speakers. But when using a home device (with an amplifier connected by jack to the MBP) or a headphone (bluetooth or jack) I prefer to disconnect Boom.
So far I have made an automator script that connect/disconnect bluetooth and quit/launch Boom.
Is there a way to upgrade my current script to be triggered with plugging/unplugging of jack or connecting/disconnecting with bluetooth device (not only when activating/disactivating bluetooth)?
Note : I'm aware of Breakaway that Automatically disable speakers when headphones are removed (but only by manually connect/disconnect the jack), but something that quit/launch a specific app will suit me better.
For the curious, here my current script using Blueutil :
set BT to do shell script "/usr/local/bin/blueutil -p" if BT is equal to "0" then do shell script "/usr/local/bin/blueutil -p 1" tell application "Boom 2" to quit else do shell script "/usr/local/bin/blueutil -p 0" tell application "Boom 2" to activate end if