aboutsummaryrefslogtreecommitdiffstats
path: root/docs/superpowers
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-15 11:13:12 +0200
committerDanilo M. <danix@danix.xyz>2026-09-15 11:13:12 +0200
commit76bc1699eeb45d22907a872ee51ee32bcf379516 (patch)
treea9b5f48bdfb155f2d7a54383471251ed1cf51238 /docs/superpowers
parent5e42fd4e4bf32c5214183f54c3e6bcec847c94b8 (diff)
downloadquickshell-76bc1699eeb45d22907a872ee51ee32bcf379516.tar.gz
quickshell-76bc1699eeb45d22907a872ee51ee32bcf379516.zip
docs: set atomicWrites explicitly in the plan's ModeFile
Review of the first task caught that the commit message credited atomicWrites while the code never set it. The property is already the documented default in 0.3.1, so the behaviour was right, but statusctl watches close_write,moved_to specifically because an atomic write arrives as a rename, and leaning on a default for something the CLI depends on is weaker than declaring it. Both ModeFile blocks in the plan now set it, so task four does not reintroduce the gap when it adds the second mode. Worth recording: the review asserted atomicWrites defaults to false in 0.3.1 and concluded the shipped writes were not atomic. The v0.3.1 and v0.3.0 documentation both read "If true (default)", so that conclusion was wrong, though the underlying observation about the unset property was right. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A7ThHHh5iTYbVfp3rNAkw2
Diffstat (limited to 'docs/superpowers')
-rw-r--r--docs/superpowers/plans/2026-09-15-status-registry.md12
1 files changed, 11 insertions, 1 deletions
diff --git a/docs/superpowers/plans/2026-09-15-status-registry.md b/docs/superpowers/plans/2026-09-15-status-registry.md
index b598129..3b95743 100644
--- a/docs/superpowers/plans/2026-09-15-status-registry.md
+++ b/docs/superpowers/plans/2026-09-15-status-registry.md
@@ -4,7 +4,7 @@
**Goal:** A `status` singleton and drawer module owning desktop modes (`dnd`, `presentation`) as files in `$XDG_RUNTIME_DIR`, with a `statusctl` CLI so anything on the system can read, set and watch them.
-**Architecture:** One `pragma Singleton` in `shared/Status.qml`, symlinked into `desktop/`, holding a `FileView` per mode with `atomicWrites` and `watchChanges`. Modes are booleans; `presentation` additionally asserts an `IdleInhibitor`, pauses breaktimer through a `Process`, and drives `dnd` while recording the prior value. A thin drawer module renders a tile and a page over the singleton. `~/bin/statusctl` reads and writes the same files directly, so it works when the shell is down.
+**Architecture:** One `pragma Singleton` in `shared/Status.qml`, symlinked into `desktop/`, holding a `FileView` per mode with `atomicWrites` and `watchChanges` set explicitly. Modes are booleans; `presentation` additionally asserts an `IdleInhibitor`, pauses breaktimer through a `Process`, and drives `dnd` while recording the prior value. A thin drawer module renders a tile and a page over the singleton. `~/bin/statusctl` reads and writes the same files directly, so it works when the shell is down.
**Tech Stack:** Quickshell 0.3.1, Qt6 QML, `Quickshell.Io.FileView`, `Quickshell.Wayland.IdleInhibitor`, bash, `inotifywait` (inotify-tools 4.23.9.0).
@@ -169,6 +169,11 @@ Singleton {
mf.setText(s);
}
+ // Both are the documented defaults in 0.3.1, set explicitly because
+ // the CLI depends on them: statusctl watches close_write,moved_to
+ // precisely because an atomic write lands as a rename, so a future
+ // release flipping this default would break the watcher silently.
+ atomicWrites: true
watchChanges: true
printErrors: false
onFileChanged: mf.reload()
@@ -651,6 +656,11 @@ Singleton {
mf.setText(s);
}
+ // Both are the documented defaults in 0.3.1, set explicitly because
+ // the CLI depends on them: statusctl watches close_write,moved_to
+ // precisely because an atomic write lands as a rename, so a future
+ // release flipping this default would break the watcher silently.
+ atomicWrites: true
watchChanges: true
printErrors: false
onFileChanged: mf.reload()