Please explain how to build status bar items to someone who has no clue how Keyboard Maestro works

I am completely new to Keyboard Maestro. I have been a programmer for decades, understand shortcuts and automator, but I am having a great deal of trouble trying to figure out how to do things in KM like status bar items. This is one of the big features in version 10, but the only things I have found so far are incomprehensible unless you are already very comfortable with KM, and I am not. Looking for "Status Bar" in search brings up tons of old and unrelated articles, usually about using other software to do this. Is there an "explain it like I am five" type tutorial that does not already assume a bunch of expertise? I'm hoping it's there and I haven't found the magic phrase to look for yet. I am trying to see if I can replace Textbar. Thanks in advance!

Since the status bar feature was my suggestion, I may be able to help.

I'll have time this weekend.

What are you trying to put in the status bar?

Should it have a menu?

How often should it update?

I was able to get a few items there following some posts, so I have one that displays the current network location using the %NetworkLocation% token every minute. The the very basic stuff I think I get. But what if I want to update an item?

For example, I have a TextBar item that runs a custom script to get the current state of Time Machine. It's runs a Python script every minute and just displays the output in the status bar. Could I do the same in KM? Is there a good blueprint for a status bar item that I can update on a trigger?

Since this is set up using a macro group and not a macro, do the macros in the group do anything? Will status bar items always be empty macro groups?

Hopefully this makes sense. Thanks for offering to help, I hope I've described what I'm looking for. If not let me know.

1 Like

You can use a Variable as the title of the Status Bar item for a Group. As soon as that Variable changes its menu bar title will change. So, as long as you can save the result of your script to a Keyboard Maestro Variable the status bar will update in real time.

One of the main uses of Groups is to limit Macros being active to when certain Apps are frontmost. So, if you have a Group of Macros that you only want to use with Finder and you set it to show in the Status bar you can access those Macros by clicking on the Group's Status bar icon/text. And that Status Bar item would only show when you are specifically working in Finder.

You can also limit the Macros from that Group that are shown in the Status Bar menu to just ones that have the Group Status Menu Trigger as one of their triggers, to make a specific shorter "favorite" list of Macros from that Group.

And... when you add that Trigger to a Macro you can even give that Macro a shorter display name that will only be displayed in that Status menu.

image

If you have an Icon showing rather than a Title you can set that Icon from a Named Clipboard (which is like a Variable but can contain an Image). If you update that Named Clipboard to a new image, the Icon in the Status bar will change.

This particular example is explained more fully here.

So, there are many possiblitlies.

3 Likes

@Zabobon posted a great answer.

I am going to add the following, on the chance that it is inspirational, or answers additional questions.

I have a menu item that shows only when Music.app is active. If Music is not active, the menu bar item is gone, which reduces menu bar clutter.

When a track is playing, the track and band are displayed in the menu bar. These are simple variables. The item updates every 5 seconds, which is enough for my needs.

The menu itself contains Music specific macros, which allows me to trigger certain macros or play predefined playlists.

I love it! I hope that helps!

3 Likes

I do this exact same thing. Very handy for when I don’t have my Stream Deck connected (and therefore can’t see that information on he SD).

1 Like

Thanks so much for the info, I think that can get me started. It seems like it can do a lot more than I thought. It's a shame there's not more documentation for this feature, since it seems like it can come in handy for any number of situations but is not very intuitive for a newcomer. Or, at least not for me, it is possible I may be a bit more thick than the average newbie. :sweat_smile:

1 Like

Awesome, that is a great example too because it shows me the whole solution. I love that. Thanks for your time and thoughtful answer. I think I am going to enjoy looking for uses for this.

1 Like