aboutsummaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-03 09:53:10 +0200
committerDanilo M. <danix@danix.xyz>2026-10-03 09:53:10 +0200
commit8af37014d58918da714c741954de92881dcb2554 (patch)
tree1fb46faca6db00c1b6034303864b21da07c14e82 /shared
parentb5aa795969dcb4115dbdc7b304fdc5dad9a3de59 (diff)
downloadquickshell-8af37014d58918da714c741954de92881dcb2554.tar.gz
quickshell-8af37014d58918da714c741954de92881dcb2554.zip
fix(status): watch for create, so a mode's first write is seenHEADmaster
Qt's atomic write builds the file as an unnamed O_TMPFILE. When the target does not exist yet it links that straight into place, and the only event naming the file is IN_CREATE: no close_write, no moved_to. statusctl watch did not listen for create, so the first write of each mode in a session went unseen. On a fresh session that is the write that matters: a Teams call started an hour in left the waybar pill reading off until some later rename happened to redraw it. The test reproduces the event with a hard link, which is what the linkat from Qt's temp file looks like to inotify. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'shared')
-rw-r--r--shared/Status.qml7
1 files changed, 4 insertions, 3 deletions
diff --git a/shared/Status.qml b/shared/Status.qml
index 0548f53..128256c 100644
--- a/shared/Status.qml
+++ b/shared/Status.qml
@@ -245,9 +245,10 @@ Singleton {
}
// 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.
+ // the CLI depends on them: statusctl watches create,moved_to
+ // precisely because an atomic write lands as a link (first write,
+ // no file yet) or a rename, so a future release flipping this
+ // default would break the watcher silently.
atomicWrites: true
watchChanges: true
printErrors: false