

The external IP address is obtained by querying a remote server and then setting the text in the menubar to the external IP address. The example menulet will display the user's external IP address in the menu bar. Therefore, for purposes of illustration and testing we will be creating a new, stand-alone application for controlling our menulet.

Menulets must belong to an application since the status bar will not retain and update your menulet for you. Alternatively, you could add these files and resources to an already existing application. The first thing to do is create a new XCode project for building this tutorial. The rest of this article will lead you through developing your own NSStatusItem menulet including displaying text or an icon in the view, making a drop-menu and setting up automatic updating. Because the NSMenuExtra API is undocumented, and subject to change by Apple whenever deemed necessary, it is best to avoid using the API in your applications. The one major benefit of an NSMenuExtra is the ability to mouse-drag reorder the menulet with regards to the other system menulets, whereas NSStatusItems are placed further along the left-side of the menulets area of the menubar. NSStatusItems are fully capable of doing most anything a menulet can do. There are two major 'flavors' of menulets: the standard and publicly documented NSStatusItem and the private and undocumented NSMenuExtra. A menulet can also extend a larger application such as DesktopManager's ( ) menulet that allows a user another means to switch between multiple virtual desktops and can display the current viewable desktop.įigure 1 shows an example menubar with the menulets (from left to right): DesktopManager, Salling Clicker, Applescript Menu, MissingSync, MenuMeters, Date/Time, Audio, and Spotlight. Menulets can be an application unto themselves, such as MenuMeters ( software/menumeters/), which displays the current CPU, memory, or network usage as graphs and blinking lights. The menubar icons and tools are frequently called 'menulets', or status items.
#Menumeters replacement install
On the Mac, this menubar is where users see the date/time, audio volume, spotlight icon, and any other number of tools they can install to display information.
#Menumeters replacement mac os x
Windows uses the 'task tray', the Linux specifies a 'system tray', and Mac OS X uses the menubar. Most modern operating systems have some constantly viewable area that displays useful icons, data, and notifications relating to your computer and other services.

