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§
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
IconPixmapproperty 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_labelalready escaped&for muda; SNI shows&&literally, so undo that. - spawn
- ksni’s
blockingAPI drives its own current-thread Tokio runtime (RUNTIME.block_on), which panics if entered from inside another runtime — and both our callers are (run_unixfor spawn, the notify task for updates). So the tray lives entirely on its own std thread; everyone else only sends itUpdates.