Skip to main content

Module linux

Module linux 

Source
Expand description

Linux tray backend — StatusNotifierItem over D-Bus via ksni (SPEC_TRAY_OPTIONAL_BACKGROUND_SERVICE_2026_09_04.md §2, §7.6; notification hub per SPEC_OS_NOTIFICATIONS_SYSTEM_2026_09_24.md §4.2).

ksni rather than tray-icon’s GTK path: no second toolkit loop next to CEF’s. The service itself runs on ksni’s thread; we add one small thread to own its blocking handle (see spawn for why it can’t live in Tokio).

Host caveats (documented, not fixable in-app): GNOME needs the “AppIndicator and KStatusNotifierItem Support” extension (Ubuntu ships it on); some SNI hosts never deliver left-click activate, and the GNOME extension shows no tooltips — so everything important is in the MENU.

Structs§

AgentMuxTray 🔒

Enums§

Update 🔒
Updates the ksni thread applies to the live tray.

Functions§

brand_pixmap 🔒
The brand mark as an SNI pixmap (ARGB32, network byte order).
notify_items 🔒
rgba_to_argb
RGBA → ARGB (big-endian), as the SNI IconPixmap property wants.
sni_label 🔒
SNI menu labels treat _ as a mnemonic marker (the & of muda) — agent names are user-chosen, so double it. notify_menu::menu_label already escaped & for muda; SNI shows && literally, so undo that.
spawn
ksni’s blocking API drives its own current-thread Tokio runtime (RUNTIME.block_on), which panics if entered from inside another runtime — and both our callers are (run_unix for spawn, the notify task for updates). So the tray lives entirely on its own std thread; everyone else only sends it Updates.