Skip to content

Tray

Displays a fully interactive icon tray using the KDE libappindicator and com.canonical.dbusmenu protocols.

Screenshot showing icon tray widget

Configuration

Type: tray

NameTypeDefaultDescription
direction'horizontal' or 'vertical' (shorthand: 'h' or 'v')Matches bar orientationThe direction in which to pack tray icons.
icon_sizeinteger16Size in pixels to display tray icons as.
prefer_theme_iconsbooltrueRequests that icons from the theme be used over the item-provided item. Most items only provide one or the other so this will have no effect in most circumstances.
on_click_leftstring'default'Action to perform on left-click. See Click Actions below.
on_click_rightstring'menu'Action to perform on right-click. See Click Actions below.
on_click_middlestring'none'Action to perform on middle-click. See Click Actions below.
on_click_left_doublestring'none'Action to perform on double-left-click. See Click Actions below.
on_click_right_doublestring'none'Action to perform on double-right-click. See Click Actions below.
on_click_middle_doublestring'none'Action to perform on double-middle-click. See Click Actions below.

Click Actions

Click actions can be one of the following built-in actions, or any custom shell command:

Built-in actions:

  • menu - Opens the tray icon’s popup menu
  • default - Triggers the tray icon’s default (primary) action
  • secondary - Triggers the tray icon’s secondary action
  • none - Do nothing

Custom commands:

Any other string is treated as a custom shell command. Custom commands support the following placeholders:

  • {name} - The tray item’s identifier/name
  • {title} - The tray item’s title (if available)
  • {icon} - The tray item’s icon name (if available)
  • {address} - The tray item’s internal address

Examples:

{
type = "tray"
on_click_left = "menu"
on_click_left_double = "default"
}

To run custom commands based on which tray item was clicked:

{
type = "tray"
on_click_left = "notify-send 'Clicked {name}'"
on_click_middle = "if [ '{name}' = 'copyq' ]; then copyq toggle; fi"
}
JSON
{
"end": [
{
"type": "tray",
"direction": "top_to_bottom"
}
]
}
TOML
[[end]]
type = "tray"
direction = "top_to_bottom"
YAML
end:
- type: "tray"
direction: "top_to_bottom"
Corn
{
end = [{
type = "tray"
direction = "top_to_bottom"
}]
}

Styling

SelectorDescription
.trayTray widget box
.tray .itemTray icon button
.tray .item.urgentTray icon button (needs attention)

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