vitorgalvao / dente-azul-workflow

Toggle bluetooth and paired device connectivity
BSD 3-Clause "New" or "Revised" License
7 stars 1 forks source link

Favorite device hotkey/keyword #5

Closed msimic-dev closed 6 months ago

msimic-dev commented 6 months ago

Feature details

A nice feature would be to connect/disconnect one specific device, only through one hotkey or keyword. It's would be useful for me, since I'm mostly using this workflow for my headphones.

Configuration could happen through a small setup, where the user can configure which device should be the "favorite". If the device isn't available to connect, a short notification could appear.

vitorgalvao commented 6 months ago

That’s overly specific and would be very complex. It makes more sense for you make the workflow for it. Connect a Hotkey Trigger to a Run Script Action with code blueutil --connect "ADDRESS" --wait-connect "ADDRESS". To disconnect, replace --connect with --disconnect. You’ll have blueutil installed already, as it’s required for this workflow. Replace ADDRESS with the address from the device, which you can get by running blueutil --connected. If you’re on Apple Silicon, you may need to use /opt/homebrew/bin/blueutil instead of blueutil on the Terminal.