Skip to content

Menu

Application menu that shows installed programs and optionally custom entries. This works by reading all .desktop files on the system.

Clicking the menu button will open the main menu. Clicking on any application category will open a sub-menu with any installed applications that match.

It is also possible to add custom categories and actions into the menu.

Screenshot of open menu showing applications inside Office category

Example

{
start = [
{
type = "menu"
start = [
{
type = "custom"
label = "Terminal"
on_click = "xterm"
}
]
height = 440
width = 200
icon = "archlinux"
label = null
}
]
}

Configuration

Items to add to the start of the main menu.

By default, this shows a number of XDG entries that should cover all common applications.

Type: Array ()
Default: None

Contains all applications matching the configured categories.

Object keys

XDG categories the associated submenu should contain.

Type: Array (string)
Default: []

Name of the image icon to show next to the label.

Type: string
Default: None

Text to display on the button.

Type: string
Default: None

Contains all applications not covered by xdg_entry categories.

Individual shell command entry.

Object keys

Name of the image icon to show next to the label.

Type: string
Default: None

Text to display on the button.

Type: string
Default: None

Shell command to execute when the button is clicked. This is run using sh -c.

Type: string
Default: None

Items to add to the end of the main menu.

Type: Array ()
Default: None

Contains all applications matching the configured categories.

Object keys

XDG categories the associated submenu should contain.

Type: Array (string)
Default: []

Name of the image icon to show next to the label.

Type: string
Default: None

Text to display on the button.

Type: string
Default: None

Contains all applications not covered by xdg_entry categories.

Individual shell command entry.

Object keys

Name of the image icon to show next to the label.

Type: string
Default: None

Text to display on the button.

Type: string
Default: None

Shell command to execute when the button is clicked. This is run using sh -c.

Type: string
Default: None

Fixed height of the menu.

When set, if the number of (sub)menu entries exceeds this value, a scrollbar will be shown.

Leave null to resize dynamically.

Type: integer
Default: None

Label to show on the menu button on the bar.

Type: string
Default:

Icon to show on the menu button on the bar.

Type: string
Default: None

Size of the label_icon image.

Type: integer
Default: 16

Command used to launch applications.

Type: string
Default: gtk-launch {app_name}

Items to add to the start of the main menu.

Type: Array ()
Default: None

Contains all applications matching the configured categories.

Object keys

XDG categories the associated submenu should contain.

Type: Array (string)
Default: []

Name of the image icon to show next to the label.

Type: string
Default: None

Text to display on the button.

Type: string
Default: None

Contains all applications not covered by xdg_entry categories.

Individual shell command entry.

Object keys

Name of the image icon to show next to the label.

Type: string
Default: None

Text to display on the button.

Type: string
Default: None

Shell command to execute when the button is clicked. This is run using sh -c.

Type: string
Default: None

Truncate options to apply to (sub)menu item labels.

See truncate options.

Default: None

Do not truncate content.

Setting this option may cause excessively long content to overflow other widgets, shifting them off-screen.

{ truncate = "off" }

Auto mode lets GTK decide when to ellipsize.

To use this mode, set the truncate option to a string declaring the location to truncate text from and place the ellipsis.

{ truncate = "start" }

Length mode defines a fixed point at which to ellipsize.

Generally you will want to set only one of length or max_length, but you can set both if required.

{
truncate.mode = "start"
truncate.length = 50
truncate.max_length = 70
}
Object keys

The fixed width (in characters) of the widget.

The widget will be expanded to this width if it would have otherwise been smaller.

Leave unset to let GTK automatically handle.

Type: integer
Default: None

The maximum number of characters to show before truncating.

Leave unset to let GTK automatically handle.

Type: integer
Default: None

The location to truncate text from and place the ellipsis.

Type: 'none' | 'start' | 'middle' | 'end'
Default: None

Fixed width of the menu.

Can be used with truncate options to customise how item labels are truncated.

Type: integer
Default: None

Styling

SelectorDescription
.menuMenu button
.popup-menuMain container of the popup
.popup-menu .mainMain menu of the menu
.popup-menu .main .categoryCategory button
.popup-menu .main .category.openOpen category button
.popup-menu .main .main-startContainer for start entries
.popup-menu .main .main-centerContainer for center entries
.popup-menu .main .main-endContainer for end entries
.popup-menu .sub-menuAll sub-menus
.popup-menu .sub-menu .applicationApplication button within submenu

For more information on styling, please see the styling guide.