I was asking for a similar thing here.
@appleianer recommended AnyBar to me:
You need to get some png files to make it show up in the menu bar.
Later, I found this post about BitBar:
BitBar is now replaced by xbar.
xbar does not need png files. We can make emoji characters (or any text) to show up in the menu bar.
You can certainly integrate this in your macro.
- show the icon (AnyBar) or emoji character (xbar)
- run execute the other actions you made
- after the actions are done, quit AnyBar/xbar.
Example for AnyBar (this requires that I have a png file named horse.png
in the AnyBar folder [see instructions on the AnyBar github page]):
Example for xbar:
This requires that we have an applescript file named "kmstatus.1d.applescript" stored in the xbar folder. This is the AppleScript:
#!/usr/bin/osascript
####################################################
##### get all variables that begins with "xbar__"
#### this exmaple is made by user 'iNik' on KM forum.
####################################################
--set AppleScript's text item delimiters to {" "}
--tell application "Keyboard Maestro Engine" to get (value of variables whose name begins with "xbar__") as text
####################################################
#### I made this just to get the value of one variable.
tell application "Keyboard Maestro Engine" to get (value of variables whose name is "xbar Icon") as text
I found xbar more flexible. It's primarily designed for other functions. It has many plugins to show all kinds of things in the menu bar. But in our case, we only need to show an emoji or something in the menu bar to remind us a certain macro is running or a macro is enabled/disabled or whatever you want. Even just for this purpose, xbar allows us to show as much text as we want.
By changing the variable value:
We can easily get
in the menu bar.