docs(readme): tray menus and keys
- commit
- 616b0de9f360efe44c11e23369d1663b2ba9fc9a
- author
- brice · · 2026-10-09 05:29 UTC
- parent
- eaec412
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
1 file · +12 -1
M README.md +12 -1
| @@ -341,11 +341,22 @@ The icon takes the main color of the application's own icon, moved toward the ba | |||
| 341 | 341 | ||
| 342 | 342 | - a left click calls the application's `Activate` (for an application that only offers a menu, it asks for the menu instead); | |
| 343 | 343 | - a middle click calls `SecondaryActivate`; | |
| 344 | - | - a right click calls `ContextMenu`, so the application shows its own menu; | |
| 344 | + | - a right click opens the application's menu, drawn by the bar (see below); an application without a dbusmenu is asked to show its own with `ContextMenu`; | |
| 345 | 345 | - the wheel calls `Scroll`: down and right are positive. | |
| 346 | 346 | ||
| 347 | 347 | Without `interactive = true` the icons only show. The tray talks to each application on a second connection and gives up on a call after 2 seconds, so a frozen application never blocks the other icons. | |
| 348 | 348 | ||
| 349 | + | **Menus.** For an application that publishes a dbusmenu (most do: Steam, Discord, nm-applet, the KDE applets), a right click opens its menu as a popup under the icon, or above it with `position = "bottom"`. A menu taller than 600 pixels scrolls. Check and radio entries show their state, disabled entries do nothing, and an entry with a submenu opens it in place, with a "‹ Back" entry on top. Choosing an entry sends the application a `clicked` event; dismissing the menu sends `closed`. | |
| 350 | + | ||
| 351 | + | | Key | Action | | |
| 352 | + | |---|---| | |
| 353 | + | | Down, Up, Tab, Shift+Tab | move between entries | | |
| 354 | + | | Enter, Space | choose the highlighted entry | | |
| 355 | + | | Left, BackSpace | go back out of a submenu | | |
| 356 | + | | Escape | close the menu | | |
| 357 | + | ||
| 358 | + | A click outside the menu also closes it. Entries are text only: icons and menus that fill in their submenus lazily are not supported. | |
| 359 | + | ||
| 349 | 360 | Resting the pointer on an icon for half a second shows the application's **tooltip** (its title in bold, its description below, markup removed; the item's title when it has no tooltip). Leaving the icon or clicking closes it. | |
| 350 | 361 | ||
| 351 | 362 | Pick another icon with `[tray.icons]`. The key is the item's id or application name, in any case; the value is a glyph name, the text to show, or `""` to hide the item: | |
| @@ -341,11 +341,22 @@ The icon takes the main color of the application's own icon, moved toward the ba | |||||
| 341 | 341 | ||||
| 342 | - a left click calls the application's `Activate` (for an application that only offers a menu, it asks for the menu instead); | 342 | - a left click calls the application's `Activate` (for an application that only offers a menu, it asks for the menu instead); | ||
| 343 | - a middle click calls `SecondaryActivate`; | 343 | - a middle click calls `SecondaryActivate`; | ||
| 344 | - | - a right click calls `ContextMenu`, so the application shows its own menu; | 344 | + | - a right click opens the application's menu, drawn by the bar (see below); an application without a dbusmenu is asked to show its own with `ContextMenu`; |
| 345 | - the wheel calls `Scroll`: down and right are positive. | 345 | - the wheel calls `Scroll`: down and right are positive. | ||
| 346 | 346 | ||||
| 347 | Without `interactive = true` the icons only show. The tray talks to each application on a second connection and gives up on a call after 2 seconds, so a frozen application never blocks the other icons. | 347 | Without `interactive = true` the icons only show. The tray talks to each application on a second connection and gives up on a call after 2 seconds, so a frozen application never blocks the other icons. | ||
| 348 | 348 | ||||
| 349 | + | **Menus.** For an application that publishes a dbusmenu (most do: Steam, Discord, nm-applet, the KDE applets), a right click opens its menu as a popup under the icon, or above it with `position = "bottom"`. A menu taller than 600 pixels scrolls. Check and radio entries show their state, disabled entries do nothing, and an entry with a submenu opens it in place, with a "‹ Back" entry on top. Choosing an entry sends the application a `clicked` event; dismissing the menu sends `closed`. | |||
| 350 | + | ||||
| 351 | + | | Key | Action | | |||
| 352 | + | |---|---| | |||
| 353 | + | | Down, Up, Tab, Shift+Tab | move between entries | | |||
| 354 | + | | Enter, Space | choose the highlighted entry | | |||
| 355 | + | | Left, BackSpace | go back out of a submenu | | |||
| 356 | + | | Escape | close the menu | | |||
| 357 | + | ||||
| 358 | + | A click outside the menu also closes it. Entries are text only: icons and menus that fill in their submenus lazily are not supported. | |||
| 359 | + | ||||
| 349 | Resting the pointer on an icon for half a second shows the application's **tooltip** (its title in bold, its description below, markup removed; the item's title when it has no tooltip). Leaving the icon or clicking closes it. | 360 | Resting the pointer on an icon for half a second shows the application's **tooltip** (its title in bold, its description below, markup removed; the item's title when it has no tooltip). Leaving the icon or clicking closes it. | ||
| 350 | 361 | ||||
| 351 | Pick another icon with `[tray.icons]`. The key is the item's id or application name, in any case; the value is a glyph name, the text to show, or `""` to hide the item: | 362 | Pick another icon with `[tray.icons]`. The key is the item's id or application name, in any case; the value is a glyph name, the text to show, or `""` to hide the item: | ||