Main Menu

Defines interfaces for accessing menu items.

class MainMenu

Represents the app’s main menu.

async static async_get_menu_item_state(connection, identifier: str)iterm2.mainmenu.MenuItemState

Queries a menu item for its state.

Return type

MenuItemState

Parameters

identifier (str) – A string. See list of identifiers in Menu Item Identifiers

Throws MenuItemException

if something goes wrong.

async static async_select_menu_item(connection, identifier: str)

Selects a menu item.

Parameters

identifier (str) – A string. See list of identifiers in Menu Item Identifiers

Throws MenuItemException

if something goes wrong.

See also

Example “Zoom on Screen

class MenuItemException

A problem was encountered while selecting a menu item.

class MenuItemState(checked: bool, enabled: bool)

Describes the current state of a menu item.

property checked

Is the menu item checked? A bool property.

property enabled

Is the menu item enabled (i.e., it can be selected)? A bool property.


Indices and tables