diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-15 14:54:36 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-15 14:54:36 +0200 |
| commit | c0473d87565569202d548eba47279321e287990c (patch) | |
| tree | 2f869d1330da836addd8e373a81ee2e96ac3c376 /shared | |
| parent | 708eeda25d3d6e47afaa75fbb77a162cb3c1ff09 (diff) | |
| download | quickshell-c0473d87565569202d548eba47279321e287990c.tar.gz quickshell-c0473d87565569202d548eba47279321e287990c.zip | |
fix(notifications): apply final review fixes
Mirror the balloon's right-click close-all on the drawer row: the spec says
the gestures are identical in both forms, and a right-click on a row
previously did nothing. The right-button branch precedes the live guard so it
behaves the same on history rows.
Stop importing the Status singleton into the notification shell. Referencing
it instantiated it, and its onPresentationChanged writes status.dnd and runs
breaktimer.sh, so a read-only consumer was writing state and shelling out on
every presentation toggle, and doubled the dndBeforePresentation race. Notify
now reads "/run/user/<uid>/status.dnd" directly through a FileView, the same
convention as the notifyd files; a missing file means off.
AGENTS.md named Drawer.qml as the drawer's reserved space; it is
desktop/NotificationList.qml.
Diffstat (limited to 'shared')
| -rw-r--r-- | shared/Notify.qml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/shared/Notify.qml b/shared/Notify.qml index ff07575..897e50b 100644 --- a/shared/Notify.qml +++ b/shared/Notify.qml @@ -39,6 +39,14 @@ Singleton { // Epoch milliseconds; 0 means not snoozing. property double snoozeUntil: 0 + // Read from the status registry's own file rather than from the Status + // singleton. The renderers only read DND; referencing Status here would + // instantiate it, and its onPresentationChanged writes status.dnd and + // shells out to breaktimer.sh, side effects a read-only consumer must not + // trigger. The file is the interface, so reading it directly is the same + // value with none of the write side. + property bool dnd: false + function parseQueue() { try { root.queue = JSON.parse(queueFile.text() || "[]"); } catch (e) { root.queue = []; } @@ -109,6 +117,16 @@ Singleton { } FileView { + id: dndFile + path: (Quickshell.env("XDG_RUNTIME_DIR") || "/tmp") + "/status.dnd" + watchChanges: true + printErrors: false + onFileChanged: reload() + onLoaded: root.dnd = dndFile.text().trim() === "1" + onLoadFailed: root.dnd = false + } + + FileView { id: snoozeFile path: root.dir + "/snooze" watchChanges: true |
