From 8af37014d58918da714c741954de92881dcb2554 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 3 Oct 2026 09:53:10 +0200 Subject: fix(status): watch for create, so a mode's first write is seen 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 --- shared/Status.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'shared/Status.qml') 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 -- cgit v1.2.3