|
| 1 | +Application menu that shows installed programs and optionally custom entries. 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. |
| 2 | + |
| 3 | +## Configuration |
| 4 | + |
| 5 | +> Type: `menu` |
| 6 | +
|
| 7 | +| | Type | Default | Description | |
| 8 | +|--------------|------------|---------|-----------------------------------------------------------------------------------------------------| |
| 9 | +| `start` | `MenuEntry[]` | `[]` | List of menu entries | |
| 10 | +| `center` | `MenuEntry[]` | default XDG menu | List of menu entries. By default this shows a number of XDG entries that should cover all common applications | |
| 11 | +| `end` | `MenuEntry[]` | `[]` | List of menu entries | |
| 12 | +| `height` | `integer | null` | `null` | The height of the menu, leave null for it to resize dynamically | |
| 13 | +| `width` | `integer | null` | `null` | The width of the menu, leave null for it to resize dynamically | |
| 14 | +| `max_label_length` | `integer` | `25` | Maximum length for the label of an XDG entry | |
| 15 | +| `label` | `string | null` | `≡` | The label of the button that opens the menu | |
| 16 | +| `label_icon` | `string | null` | `null` | An icon (from icon theme) to display on the button which opens the application menu | |
| 17 | +| `label_icon_size` | `integer` | `16` | Size of the label_icon if one is supplied | |
| 18 | + |
| 19 | + |
| 20 | +> Type: `MenuEntry` |
| 21 | +
|
| 22 | +| | Type | Default | Description | |
| 23 | +|--------------|------------|---------|-----------------------------------------------------------------------------------------------------| |
| 24 | +| `type` | `xdg_entry | xdg_other | custom` | | Type of the entry | |
| 25 | +| `label` | `string` | | Label of the entry's button | |
| 26 | +| `icon` | `string | null` | `null` | Icon for the entry's button | |
| 27 | +| `categories` | `string[]` | | If `xdg_entry` this is is the list of freedesktop.org categories to include in this entry's sub menu | |
| 28 | +| `on_click` | `string` | | If `custom` this is a shell command to execute when the entry's button is clicked | |
| 29 | + |
| 30 | +<details> |
| 31 | + |
| 32 | +<summary>JSON</summary> |
| 33 | + |
| 34 | +```json |
| 35 | +{ |
| 36 | + "start": [ |
| 37 | + { |
| 38 | + "type": "menu", |
| 39 | + "start": [ |
| 40 | + { |
| 41 | + "type": "custom", |
| 42 | + "label": "Terminal", |
| 43 | + "on_click": "xterm", |
| 44 | + } |
| 45 | + ], |
| 46 | + "height": 440, |
| 47 | + "width": 200, |
| 48 | + "icon": "archlinux", |
| 49 | + "label": null |
| 50 | + } |
| 51 | + ] |
| 52 | +} |
| 53 | + |
| 54 | + |
| 55 | +``` |
| 56 | + |
| 57 | +</details> |
| 58 | + |
| 59 | +<details> |
| 60 | +<summary>TOML</summary> |
| 61 | + |
| 62 | +```toml |
| 63 | +[[start.menu]] |
| 64 | +height = 400 |
| 65 | +width = 200 |
| 66 | +icon = "archlinux" |
| 67 | +label = null |
| 68 | + |
| 69 | +[[start.menu.start]] |
| 70 | +type = "custom" |
| 71 | +label = "Terminal" |
| 72 | +on_click = "xterm" |
| 73 | +``` |
| 74 | + |
| 75 | +</details> |
| 76 | + |
| 77 | +<details> |
| 78 | +<summary>YAML</summary> |
| 79 | + |
| 80 | +```yaml |
| 81 | +start: |
| 82 | + - type: "menu" |
| 83 | + start: |
| 84 | + - type: custom |
| 85 | + label: Terminal |
| 86 | + on_click: xterm |
| 87 | + height: 440 |
| 88 | + width: 200 |
| 89 | + icon: archlinux |
| 90 | + label: null |
| 91 | +``` |
| 92 | +
|
| 93 | +</details> |
| 94 | +
|
| 95 | +<details> |
| 96 | +<summary>Corn</summary> |
| 97 | +
|
| 98 | +```corn |
| 99 | +{ |
| 100 | + start = [ |
| 101 | + { |
| 102 | + type = "menu" |
| 103 | + start = [ |
| 104 | + { |
| 105 | + type = "custom" |
| 106 | + label = "Terminal" |
| 107 | + on_click = "xterm" |
| 108 | + } |
| 109 | + ] |
| 110 | + height = 440 |
| 111 | + width = 200 |
| 112 | + icon = "archlinux" |
| 113 | + label = null |
| 114 | + } |
| 115 | + ] |
| 116 | +} |
| 117 | +``` |
| 118 | + |
| 119 | +</details> |
| 120 | + |
| 121 | +## Styling |
| 122 | + |
| 123 | +| Selector | Description | |
| 124 | +|-------------------------------|--------------------------------| |
| 125 | +| `.menu` | Menu button | |
| 126 | +| `.menu-popup` | Main container of the popup | |
| 127 | +| `.menu-popup_main` | Main menu of the menu | |
| 128 | +| `.menu-popup_main_start` | Container for `start` entries | |
| 129 | +| `.menu-popup_main_center` | Container for `center` entries | |
| 130 | +| `.menu-popup_main_end` | Container for `end` entries | |
| 131 | +| `.menu-popup_sub-menu` | All sub-menues | |
| 132 | + |
| 133 | +For more information on styling, please see the [styling guide](styling-guide). |
0 commit comments