The same issue happened to my menus that are not application specific, when I started up this morning (meaning that the menus rearranged themselves after a reboot). I can reproduce this 100%.
Before a reboot, I set the menus in this order by ⌘-dragging them (they stay in this order until I reboot):
There is no way to control where the menus appear. You can drag them around, but the system wont necessarily remember where you put them. Typically if they are removed and then put back they will go to the end (furthest from the right) of the items.
As far as I am aware there is no way to control this and have the menu items be removed and reappear (including when you restart, or if the menu items are removed for other reasons like macro group activation) and still retain their position.
That said, if I relaunch the Keyboard Maestro Engine, its menu item stays in position, not at the right, so maybe there is some ID that the system bases it on. I'll investigate.
Thank you @peternlewis — I hope that your investigation is fruitful. The order change annoys me to no end.
I know that macOS does something to remember the positions of some apps. I use one other third party menu bar app, called TweeShot. If I ⌘-drag it to the left or right of the Keyboard Maestro icon, macOS keeps them in that order, even through reboots.
I don't know if these developers can offer any insight, but I will link to them, in case you want to reach out to any of them. They all make utilities that manage the macOS menu bar in one way or another. If you don't come up with an internal solution, I will be trying them as a last resort.
I've found Bartender delays the menu bar items from appearing for several seconds. So I've stopped using it for the time being since I can hide most of the icons I don't need from those apps preferences, and having the KM menu bar icons appear right away is more important.
OK, with some help from Bartender’s Ben Surtees I believe I have this mostly resolved for the next version.
Note however that the system remembers the position of an item only as a pixel distance from the right hand side of the menubar, so while that will work if your menus options are relatively stable, if you add and remove menu items, or have varying length menu items, the positions may not be remembered accurately relative to other menu items.
I got really excited about the new Display in Menu Bar trigger but discovered it's nerfed by the Hidden Bar app (and probably other Menu Bar filtering apps).
For example, I set my Finder macro group to display in the menu bar, which adds it to the left end of the Menu Bar. Hidden Bar hides any Menu Bar items you don't drag past the always visible delineator. I dragged my Finder menu into the always show area and went about my work. As soon I switch to another app, the KM-generated Finder menu disappears (expected behavior), but when I come back to Finder, the menu is once again at the far left of the Menu Bar and hidden by Hidden Bar. This happens for all macro groups with the Display in Menu Bar trigger.
Is there anything I can do (short of not using Hidden Bar) to make the menus always visible?
I confirm it is working now as intended: I mean groups in menu bar appear for me instantly now with Bartender running. This is my favourite toy now )) thanks @peternlewis!
Just one question: as I use Apps native icons for groups, is it possible to somehow scale these icons, since they look too small? A kind of scaling multiplier?
Yes, this is a brilliant new feature. It can replace using Palettes for some of my Apps. Thanks @peternlewis
And I just discovered... clicking on one of the items whilst holding down the Alt Key, opens that Macro for editing in Keyboard Maestro (just like on a Palette).