Create and manage menubar icons
Signature | hs.menubar.priorities[] |
---|---|
Type | Constant |
Description | Pre-defined list of priority levels which can be used for positioning menubar items. |
Source | extensions/menubar/internal.m |
Signature | hs.menubar.new([inMenuBar]) -> menubaritem or nil |
---|---|
Type | Constructor |
Description | Creates a new menu bar item object and optionally add it to the system menubar |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/menubar/internal.m |
Signature | hs.menubar.newWithPriority(priority) -> menubaritem or nil |
---|---|
Type | Constructor |
Description | Creates a new menu bar item object with the specified priority |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/menubar/internal.m |
Signature | hs.menubar:delete() |
---|---|
Type | Method |
Description | Removes the menubar item from the menubar and destroys it |
Parameters |
|
Returns |
|
Source | extensions/menubar/internal.m |
Signature | hs.menubar:frame() -> hs.geometry rect |
---|---|
Type | Method |
Description | Returns the menubar item frame |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/menubar/init.lua |
Signature | hs.menubar:icon() -> hs.image object |
---|---|
Type | Method |
Description | Returns the current icon of the menubar item object. |
Parameters |
|
Returns |
|
Source | extensions/menubar/internal.m |
Signature | hs.menubar:isInMenuBar() -> boolean |
---|---|
Type | Method |
Description | Returns a boolean indicating whether or not the specified menu is currently in the OS X menubar. |
Parameters |
|
Returns |
|
Source | extensions/menubar/internal.m |
Signature | hs.menubar:popupMenu(point[, darkMode]) -> menubaritem |
---|---|
Type | Method |
Description | Display a menubaritem as a pop up menu at the specified screen point. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/menubar/internal.m |
Signature | hs.menubar:priority([priority]) -> menubaritem | current-value |
---|---|
Type | Method |
Description | Get or set a menubar item's priority |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/menubar/internal.m |
Signature | hs.menubar:removeFromMenuBar() -> menubaritem |
---|---|
Type | Method |
Description | Removes a menu from the system menu bar. The item can still be used as a pop-up menu, unless you also delete it. |
Parameters |
|
Returns |
|
Source | extensions/menubar/internal.m |
Signature | hs.menubar:returnToMenuBar() -> menubaritem |
---|---|
Type | Method |
Description | Returns a previously removed menu back to the system menu bar. |
Parameters |
|
Returns |
|
Source | extensions/menubar/internal.m |
Signature | hs.menubar:setClickCallback([fn]) -> menubaritem |
---|---|
Type | Method |
Description | Registers a function to be called when the menubar item is clicked |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/menubar/internal.m |
Signature | hs.menubar:setIcon(imageData[, template]) -> menubaritem or nil |
---|---|
Type | Method |
Description | Sets the image of a menubar item object. The image will be displayed in the system menubar |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/menubar/internal.m |
Signature | hs.menubar:setMenu(menuTable) -> menubaritem |
---|---|
Type | Method |
Description | Attaches a dropdown menu to the menubar item |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/menubar/internal.m |
Signature | hs.menubar:setTitle(title) -> menubaritem |
---|---|
Type | Method |
Description | Sets the title of a menubar item object. The title will be displayed in the system menubar |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/menubar/internal.m |
Signature | hs.menubar:setTooltip(tooltip) -> menubaritem |
---|---|
Type | Method |
Description | Sets the tooltip text on a menubar item |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/menubar/internal.m |
Signature | hs.menubar:stateImageSize([size]) -> hs.image object | current value |
---|---|
Type | Method |
Description | Get or set the size for state images when the menu is displayed. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/menubar/internal.m |
Signature | hs.menubar:title([styled]) -> string | styledtextObject |
---|---|
Type | Method |
Description | Returns the current title of the menubar item object. |
Parameters |
|
Returns |
|
Source | extensions/menubar/internal.m |