hammerspoon2-docs
    Preparing search index...

    Interface HSMenuItem

    An item in a menu built from JavaScript, for HSMenuBarItem.setMenu(), HSMenuBarItem.popUpMenu() and hs.dockicon.setMenu()

    interface HSMenuItem {
        checked?: boolean;
        color?: string | HSColor;
        disabled?: boolean;
        fn?: () => void;
        icon?: HSImage;
        menu?: HSMenuItem[];
        shortcut?: string | HSMenuShortcut;
        title: string;
        tooltip?: string;
    }
    Index
    checked?: boolean

    If true, a checkmark is shown next to the item

    color?: string | HSColor

    The colour of the item's title, as an HSColor or a hex string

    disabled?: boolean

    If true, the item is greyed out and cannot be chosen

    fn?: () => void

    Called when the item is chosen

    icon?: HSImage

    An icon shown to the left of the title

    menu?: HSMenuItem[]

    The items of a submenu

    shortcut?: string | HSMenuShortcut

    A keyboard shortcut shown at the right-hand side of the item: a string of modifier symbols (⌘ ⇧ ⌥ ⌃) followed by one key, as the menu shows it ("⇧⌘N", or just "F" for no modifiers), or the modifiers and key spelled out. It only works while the menu is open

    title: string

    The item's label. Use "-" for a separator line

    tooltip?: string

    Shown when hovering over the item