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

Configuration

TypeDefaultDescription
startMenuEntry[][]Items to add to the start of the main menu.
centerMenuEntry[]Default XDG menuItems to add to the centre of the main menu. By default this shows a number of XDG entries that should cover all common applications.
endMenuEntry[][]Items to add to the end of the main menu.
heightintegernullHeight of the menu. Leave null to resize dynamically.
widthintegernullWidth of the menu. Leave null to resize dynamically.
labelstringLabel to show on the menu button on the bar.
label_iconstringnullIcon to show on the menu button on the bar.
label_icon_sizeinteger16Size of the label_icon image.
launch_commandstringgtk-launch {app_name}Command used to launch applications.
truncate'start' or 'middle' or 'end' or off or MapoffApplies to popup. The location of the ellipses and where to truncate text from. Leave null to avoid truncating. Use the long-hand Map version if specifying a length.
truncate.mode'start' or 'middle' or 'end' or offoffApplies to popup. The location of the ellipses and where to truncate text from. Leave null to avoid truncating.
truncate.lengthintegernullApplies to popup. The fixed width (in chars) of the widget. Leave blank to let GTK automatically handle.
truncate.max_lengthintegernullApplies to popup. The maximum number of characters before truncating. Leave blank to let GTK automatically handle.

Each entry can be one of three types:

  • xdg_entry - Contains all applications matching the configured categories.
  • xdg_other - Contains all applications not covered by xdg_entry categories.
  • custom - Individual shell command entry.
TypeDefaultDescription
typexdg_entry or xdg_other or customType of the entry.
labelstring''Label of the entry’s button.
iconstringnullIcon for the entry’s button.
categoriesstring[][][xfg_entry] List of freedesktop.org categories to include in this entry’s sub menu .
on_clickstring''[custom] Shell command to execute when the entry’s button is clicked

Default XDG Menu

Setting the center menu entries will override the default menu.

The default menu can be found in the default example files here.

JSON
{
"start": [
{
"type": "menu",
"start": [
{
"type": "custom",
"label": "Terminal",
"on_click": "xterm"
}
],
"height": 440,
"width": 200,
"icon": "archlinux",
"label": null
}
]
}
TOML
[[start]]
type = "memu"
height = 400
width = 200
icon = "archlinux"
[[start.start]]
type = "custom"
label = "Terminal"
on_click = "xterm"
YAML
start:
- type: "menu"
start:
- type: custom
label: Terminal
on_click: xterm
height: 440
width: 200
icon: archlinux
label: null
Corn
{
start = [
{
type = "menu"
start = [
{
type = "custom"
label = "Terminal"
on_click = "xterm"
}
]
height = 440
width = 200
icon = "archlinux"
label = null
}
]
}

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.