Jump to content
Denis The Menace

Connect/disconnect to/from paired Bluetooth devices

Recommended Posts

Posted (edited)

Decided to share my workflow which allows to connect and disconnect with already paired bluetooth devices.

It relies on blueutil command line utility, which can be install via Homebrew:

brew install blueutil

I deliberately choose the fastest way to achieve the simple goal. Thus, workflow is fairly simple and works via shell scripts. Also, this approach allows anyone interested to modify and extend it like in no time. 

 

Workflow features two shortcuts: btc and btd, they stand for BlueTooth Connect and BlueTooth Disconnect respectively. As you type, list of devices is populated on the fly. 

 

https://drive.google.com/file/d/1AshZo4dYuQ5vEvCYJz8KTTh0xw71w4UD/view?usp=sharing

 

I don't think I will spare significant time improving this workflow since it already fulfills my needs. But I see it as a good starting point for further development for anyone curious.

 

Enjoy it!

Edited by Denis The Menace

Share this post


Link to post

I am getting lot of NULL devices. By adding after first grep this can be avoided: 

| grep -v "(null)" 

BTW: Why are you not putting WF on Git? Would be easier to fork ;)

Share this post


Link to post
7 hours ago, Acidham said:

BTW: Why are you not putting WF on Git? Would be easier to fork

 

Not a problem at all. I'm not very experienced with Workflows but as I see, exported workflow is actually a zip archive. To me, it wouldn't be very convenient to put binary zip into git.

I'll see if it is possible to put all files like icons, shells scripts, etc. separately and add simple script which bundles everything into .workflow file.

 

7 hours ago, Acidham said:

I am getting lot of NULL devices. By adding after first grep this can be avoided: 

 

Duly noted, thanks. As an excuse, I did not see any null devices at my side :)

Share this post


Link to post

Usually you can add binary (.alfredworkflow) into root together with README.MD of repo and add a folder called src. Then unpack the .alfredworkflow and copy it into src folder. With this you have the binary there for installation and src in a separate folder. 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...