Skip to content
locainin edited this page Aug 12, 2026 · 4 revisions

Rules

Rules apply per-notification overrides based on app metadata and notification fields. All matches are case-insensitive substring matches.

Fields

  • name: optional rule label for logging.
  • app: daemon-resolved application identity match. It checks the resolved display name or desktop id and fails closed when attribution is unresolved, conflicting, or a relay.
  • claimed_app: sender-provided freedesktop app_name match. This is an explicit match against untrusted presentation metadata and is not a trusted identity check.
  • summary: summary match.
  • body: body match.
  • category: category hint match.
  • urgency: low, normal, critical (or 0, 1, 2).
  • no_popup: suppress popups.
  • silent: suppress sound.
  • force_urgency: override urgency (low, normal, critical).
  • expire_timeout_ms: override the protocol timeout (-1 uses UnixNotis policy, 0 disables both automatic clocks, and positive values set the banner duration and close non-critical active records after that duration). A positive timeout is not cancelled by resident; critical notifications hide the popup but retain the active record.
  • resident: force resident flag.
  • transient: force transient flag.

Urgency values accept either strings or numbers:

  • low or 0
  • normal or 1
  • critical or 2

Invalid urgency values make config loading fail instead of being guessed.

Order

Rules are evaluated in order. Later rules can override earlier ones.

Rules are applied after the notification payload has been sanitized and before popup, sound, and expiration decisions are made. That means a rule can:

  • silence a notification before sound playback
  • suppress a popup while still allowing history storage
  • force critical urgency before DND popup filtering runs
  • change timeout behavior for matching notifications

Rules do not grant identity or interaction authority. A rule can alter presentation and lifecycle flags, but action and reply policy still comes from daemon attribution, launch evidence, advertised actions, and the exact active generation.

For the resulting active/banner clocks, see Notification Lifecycle. Rule no_popup is evaluated before later runtime DND and inhibitor gating; it suppresses that notification's popup even when DND is off. DND and inhibitors are runtime controls described in Configuration and D-Bus API.

Dismissed notifications are not archived. Transient notifications are archived only when [history].transient_to_history = true, even if a rule marks the notification transient.

Examples

[[rules]]
name = "quiet-slack"
app = "slack"
no_popup = true
silent = true

[[rules]]
name = "critical-alerts"
summary = "alert"
force_urgency = "critical"
expire_timeout_ms = 10000

Clone this wiki locally