Permanently remove this item from the menu bar and release all resources.
After calling destroy(), the item is no longer usable.
This is called automatically on hs.reload(). Use hide() instead
if you only want to temporarily remove the item without freeing it.
Remove this item from the menu bar. It can be shown again with show() while you keep a reference to it.
Check if this item is currently visible in the menu bar.
true if the item is visible in the menu bar
Immediately open a menu below this item, independently of any menu set with setMenu().
This is intended to be called from a click callback, so that a single item can perform an action on one
kind of click and offer a menu on another. The menu item objects are the same as for setMenu().
If the item is hidden, the menu opens at the mouse pointer instead.
Array of menu item objects
Set a callback invoked when the item is clicked with any mouse button (only fires when no menu is set).
from 1 (so a mouse's fourth and fifth buttons are "button4" and "button5"). A Ctrl-click, the
standard macOS secondary click, is reported as "right" (and modifiers still includes "ctrl").
hs.eventtap.currentModifiers() (e.g. ["cmd", "leftCmd"]).
To offer a menu alongside a click action, leave the menu unset and call popUpMenu() from this callback.
A function to call on click, or null to remove the callback
Set the icon displayed in the menu bar
An HSImage object, or null to remove the icon
Set the menu for this item. Pass an array of menu item objects for a static menu,
or a function that returns an array for a dynamic menu populated each time it opens.
The function receives one argument: the modifier keys held when the menu opened, in the same form as
hs.eventtap.currentModifiers().
While a menu is set, clicking the item opens the menu and the click callback is not called.
Array of menu item objects, a function returning such an array, or null to remove the menu
Set the tooltip shown when hovering over the menu bar item
Tooltip text, or null to remove the tooltip
Object representing a macOS system menu bar item. Create instances with
hs.menubar.create().