Skip to main content

Module linux

Module linux 

Source
Expand description

Linux notification backend — SPEC_OS_NOTIFICATIONS_SYSTEM_2026_09_24.md §6.3.

freedesktop Desktop Notifications (org.freedesktop.Notifications) spoken directly over async zbus on the launcher’s Tokio runtime — no libnotify, no GTK, no blocking D-Bus calls. One task owns the session-bus connection:

  • Notify with replaces_id = the server id last used for this tag, so a same-group update replaces in place (spec §5.3);
  • CloseNotification for retract / clear-all;
  • ActionInvoked("default") → click, NotificationClosed(reason 2) → user dismissal (1 = expired, 3 = closed by us — neither is feedback).

Clicks only reach a process still on the bus — fine, the launcher lives for the whole session (and clears its notifications on exit).

Content safety (§9.1): if the server advertises body-markup, the body is escaped so agent-influenced text can’t inject markup. The summary is never markup per the spec.

Structs§

LinuxPresenter

Enums§

Cmd 🔒

Constants§

DEST 🔒
IFACE 🔒
PATH 🔒

Functions§

closed_is_user_dismissal
Map a NotificationClosed reason to user feedback: only 2 (“dismissed by the user”) counts.
delivery
(urgency, expire_timeout, resident) for a notification.
escape_markup
Escape for servers that parse the body as (a subset of) markup.
run 🔒
texts
(summary, body) exactly as sent — pure, so the escaping rule is testable. (The freedesktop “summary” is our title.) The agent’s session summary has no slot of its own on Linux, so it is the body’s last line (rich-content spec §1.3), escaped like the rest of the body.