Jump to content

Dente Azul — Toggle bluetooth and paired device connectivity


Recommended Posts

When reporting issues, please include your exact installed versions of:

  • The Workflow.
  • Alfred.
  • macOS.

In addition to:

  • The debugger output. Perform the failing action, click “Copy” on the top right and paste it here.
  • Details on what you did, what happened, and what you expected to happen. A short video of the steps with the debugger open may help to find the problem faster.

Thank you. Accurate and thorough information is crucial for a proper diagnosis which allows me to help you better.

Link to comment
  • 2 weeks later...

I’ve made a tiny update. So tiny, I haven’t even given it a version bump. I’ve updated the icon, but in a way that the corrections are so small, you’re unlikely to notice them (even if you look at them now). But they matter to me, and my consistency with the Alfred icons I design. Just posting in case you’re obsessive about getting the exact right Workflow (download is at the same link).

mMaWbSH.gif

Link to comment
  • 11 months later...

This is great! The only thing I came here to say besides thanks was that the bluetooth icon resets position after toggling. So if I want to customize where it appears, this would reset it. However, for my purpose I always want to know if it's on or off, so I just commented the menu item hiding line out.

Link to comment
  • 4 months later...

Beautiful. Thank you.

 

Perhaps building off the previous comment, is it possible to have a branch for a version that does not toggle the menu bar but instead displays whether Bluetooth is enabled or not in the Alfred window subtext? I don’t know enough yet to know if this is possible, but I have so many menu bar icons already it would be nice to be able to keep BT out of it.

 

On 3/11/2017 at 10:53 AM, vitor said:

I’ve updated the icon, but in a way that the corrections are so small, you’re unlikely to notice them

 

As the son of a self-employed graphic designer who tried to train me from birth, I find this quite relatable.

Edited by Neberheim
Link to comment
11 hours ago, Neberheim said:

Perhaps building off the previous comment, is it possible to have a branch for a version that does not toggle the menu bar but instead displays whether Bluetooth is enabled or not in the Alfred window subtext?

 

Not sure it’s possible without using an external tool (which I’m avoiding for this particular Workflow). Either way, Workflows for toggling Bluetooth are short to make and there are too many ways to go about it, so for this one I want to solve a very particular issue: people who rarely turn on bluetooth and then forget to turn it off, which is why it works like it does.

 

10 hours ago, Neberheim said:

I have so many menu bar icons already

 

I recommend instead you take a look at Bartender (paid) or Vanilla (free).

 

11 hours ago, Neberheim said:

As the son of a self-employed graphic designer who tried to train me from birth, I find this quite relatable.

 

Obligatory XKCD.

Link to comment
1 hour ago, vitor said:

I recommend instead you take a look at Bartender (paid) or Vanilla (free).

 

This may be the greatest find of the year. I don’t know why it never occurred to me to search for such an app; I suppose I hadn’t yet needed to find a solution from hitting critical mass menu bar.

Disregard my previous request: this is the answer to my prayers and the workflow as-is, is perfect for how I will set up the menu bar. I realized that it reciprocates the current setting, so if I have the menu bar off with BT on, then running the workflow pops up a greyed out BT menubar that clears when it’s re-enabled by the workflow. I prefer to leave BT on the majority of the time unless I’m in public, so I like it only appearing when disabled.

 

1 hour ago, vitor said:

 

I actually laughed out loud at that ?

 

15 minutes ago, deanishe said:

Also, what's "kerning"?

 

I will let you Wiki that if you so choose; ignorance is bliss.

 

Edited by Neberheim
Link to comment
10 minutes ago, deanishe said:

Also, what's "kerning"?

 

Kerning is the process of spacing individual pairs of letters to a achieve a more pleasant visual result (or a less unpleasant one, depending on how you look at it). Letter-spacing is a uniform spacing between all letter pairs.


Kerning is not something you would do for a whole text, but it is something you should take care of doing for small amounts of important text (a headline or a logo).

 

Also related is the term “keming”, meaning “the result of bad kerning”, because a lowercase RN too close together looks like a lowercase M. That’s a more contemporary term, while the others have existed since the days of manual typesetting.

Link to comment
3 minutes ago, Neberheim said:

ignorance is bliss.

 

Knowing what something is is a different matter to being able to recognise when it's done badly.

 

You're new to the forum, so you won't have picked up on these things yet, but I'm the graphically-challenged guy. Find a workflow with bad icons, it's probably one of mine.

Link to comment
5 minutes ago, deanishe said:

Knowing what something is is a different matter to being able to recognise when it's done badly.

 

There’s a subreddit dedicated to it (of course there is). I’m sure you’ll find plenty of examples where you’ll recognise keming because it frequently makes reading harder. At its worst it can change the meaning of a sentence, as in the example of “therapists” becoming “the rapists”.

 

SNL also did a sketch where the actor playing Sean Connery read themes as if they were badly kerned.

Link to comment
1 hour ago, vitor said:

I’m sure you’ll find plenty of examples where you’ll recognise keming because it frequently makes reading harder. At its worst it can change the meaning of a sentence

 

Oh sure, but that's the typographical equivalent of the utterly tone-deaf folks they let on talent shows: it's so bad that even mostly tone-deaf people like me can tell.

 

The more subtle examples that irritate the cognoscenti go way over my head.

 

1 hour ago, vitor said:

 

Quote

The uploader has not made this video available in your country.

 

:( 

 

Link to comment
4 hours ago, vitor said:

 

I spent hours marking up the graduate admissions letter from a certain university ... someone had clearly attempted unsuccessfully to recreate letterhead in a Word document ... kerning was just one of many many problems.  To me, it was like telling prospective graduate students that we don’t care about attention to detail so come to our university.  Painful to look at.

Link to comment

Updates.


I’ve changed the Keyword from bt to btt. On the technical side, it’s no longer a Keyword but a Script Filter, and it gives you visual indication of the connection state, just for fun. There was also the small issue that since both states were toggled, it was possible to get into the situation where states were reversed. No more! Now turning bluettooth on always turns on the icon, and vice-versa.


I’ve also added the Keyword (again, Script Filter) btd which shows your paired devices, if they’re connected, and lets you toggle that connection state.


To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater.

Link to comment
  • 1 month later...
  • 4 weeks later...

Update.

 

It uses blueutil version 2.5.1 and its new JSON format. If you have any issues with this new version, they may be due to an outdated blueutil. Try rm "${HOME}/Library/Application Support/Alfred/Workflow Data/com.vitorgalvao.alfred._sharedresources/bin/blueutil"; brew update; brew upgrade blueutil.


To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater.
 

Edited by vitor
Link to comment

Great workflow, just wanted to point out that the update (via OneUpdater) didn't seem to connect for some reason to the blueutil located in the shared_resources directory so broke the workflow, however I installed blueutil via homebrew as you recommended and it works again. Not sure why it didn't connect but just wanted to let you know. I can send you the debug report if you like.

Link to comment
2 hours ago, msa said:

didn't seem to connect for some reason to the blueutil located in the shared_resources directory (…) I installed blueutil via homebrew as you recommended 

 

I’ve changed the order of the instructions; rm should have come first. My suggestion wasn’t to install blueutil via Homebrew, but rather to upgrade it if it was already installed (because that’s what _shared_resources looks for first). Removing blueutil from the _shared_resources directory should be enough to have it reinstall when invoking the Workflow. It works for me, but if you can still reproduce I’m interested, yes.


To reproduce you’d brew uninstall blueutil; rm "${HOME}/Library/Application Support/Alfred/Workflow Data/com.vitorgalvao.alfred._sharedresources/bin/blueutil" then call the Workflow (version 1.2.0). If it doesn’t work, I’d like to know the result of "${HOME}/Library/Application Support/Alfred/Workflow Data/com.vitorgalvao.alfred._sharedresources/bin/blueutil" --version.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...