There are two ways to get the menu on the right side of the menu bar. An officially supported way to create NSStatusItem
in your application. Other ways to create NSMenuExtra
. You noticed one difference: the NSStatusItem
menu NSStatusItem
fixed in place, while additional menu options can be moved using cmd-drag.
Another significant difference and the reason why third-party auxiliary functions of the menu are not officially supported is that, unlike status items (which run as separate applications), additional menus are loaded into the address space of the SystemUIServer process. This means that if they go away and crash, they can remove the user interface.
You can see the menu option installed on your system in /System/Library/CoreServices/Menu Extras
. You may be able to create your own and load the OS, but when you try to send the result, you will run into problems. Itβs better to go to bugreport.apple.com and tell them that NSStatusItems should be dragged.
Wikipedia has additional information about menu options , including some links to a tutorial on creating your own .
source share