diff options
Diffstat (limited to 'docs/superpowers/specs')
| -rw-r--r-- | docs/superpowers/specs/2026-09-15-notification-daemon-design.md | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/docs/superpowers/specs/2026-09-15-notification-daemon-design.md b/docs/superpowers/specs/2026-09-15-notification-daemon-design.md index fa287e1..4e2806a 100644 --- a/docs/superpowers/specs/2026-09-15-notification-daemon-design.md +++ b/docs/superpowers/specs/2026-09-15-notification-daemon-design.md @@ -60,10 +60,12 @@ closed by a `CloseNotification` call. All of this is in the daemon and is independent of any renderer. **Timeout, and the two lifetimes.** `expire_timeout` from `Notify` is honoured -exactly as the notification's balloon lifetime: `0` means use the urgency -default, `-1` means never expire, any positive value is milliseconds. The -urgency defaults are `10s` for low, `10s` for normal and never for critical, -matching the running dunst. `ronema` relies on `-t 0` meaning never and `-t 1` +exactly as the notification's balloon lifetime, in the spec's direction: `-1` +means the server decides, so it takes the urgency default; `0` means never; any +positive value is milliseconds and wins. The urgency defaults are `10s` for +low, `10s` for normal and never for critical, matching the running dunst. +libnotify sends `-1` by default, so a plain `notify-send` gets the urgency +default, and `dunst` agrees. `ronema` relies on `-t 0` meaning never and `-t 1` meaning effectively immediate; both work unchanged. At expiry the daemon emits `NotificationClosed(id, 1)` and the balloon goes, @@ -122,15 +124,16 @@ A live notification is one object: "urgency": "normal", "icon": "/home/you/.local/share/icons/.../mail-unread-multiple.svg", "actions": [["default", "open"]], - "created": 1758000000, - "expires": 1758000010 + "created": 1758000000000, + "expires": 1758000010000 } `app`, `summary` and `body` are markup. `icon` is an absolute path or empty. -`actions` is the spec's key and label pairs. `expires` is an epoch second, or -`0` for a notification that never expires; a value in the past means the -balloon has gone and the entry is inert. The history objects are the same -shape. +`actions` is the spec's key and label pairs. `created` and `expires` are epoch +milliseconds, so a sub-second timeout (`ronema` sends `-t 1`) is exact rather +than rounding to zero, which would read as never. `expires` is `0` for a +notification that never expires; a value in the past means the balloon has gone +and the entry is inert. The history objects are the same shape. `queue.json` is capped at 20; an arrival beyond the cap pushes the oldest into history. |
