From 1020e3db0863bd5be081b7d2fd2aa74ad7c4ff49 Mon Sep 17 00:00:00 2001 From: Pawel Waszkiewicz Date: Sun, 30 Aug 2026 22:00:53 +0200 Subject: [PATCH 1/2] Read the config with its path, not with the placeholder command The service starts its config reader from onPluginDirChanged, because pluginDir is only known once the shell has injected the manifest. That handler runs before the Process's own command binding has been re-evaluated, so the reader started as ["true"]: it collected nothing, parseConfig ran against an empty string, and every output was left to omarchy.background. Nothing said so. The inotify watcher picked the file up on the next write, which made pinning a wallpaper work and made it look like the config was being honoured -- until the shell was restarted, when every pinned display quietly went back to the theme background. Set the command explicitly at the point the read is started, so it is against configPath rather than against whichever binding pass happened to have run. Co-Authored-By: Claude Opus 5 --- Wallpaper.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Wallpaper.qml b/Wallpaper.qml index 0112574..02aa524 100644 --- a/Wallpaper.qml +++ b/Wallpaper.qml @@ -134,6 +134,14 @@ Item { function reloadConfig() { if (!root.pluginDir || configReader.running) return + //: pluginDir arrives after the service is constructed, and this runs from + //: its change handler -- before the command binding above has been + //: re-evaluated. Starting the process there would run the ["true"] + //: placeholder, collect nothing, and leave every output on the theme + //: background until wallpapers.json was next written. Set the command + //: outright so the read is against the path, not against whichever + //: binding pass got there first. + configReader.command = [root.pluginDir + "/read-config.sh", root.configPath] configReader.running = true } From aebe1aa3268f09497609ca463523016ac7035af6 Mon Sep 17 00:00:00 2001 From: Pawel Waszkiewicz Date: Sun, 30 Aug 2026 22:00:53 +0200 Subject: [PATCH 2/2] Point the reload IPC at the reader that replaced the FileView The handler still called configFile.reload(), the FileView that bounding the config read removed. The call throws, so `omarchy-shell displaywright reload` returned an error rather than "ok", and pick-wallpaper.sh -- which calls it to save the watch latency, and ignores the failure -- was left waiting on inotify for a wallpaper it had just written. Co-Authored-By: Claude Opus 5 --- Wallpaper.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Wallpaper.qml b/Wallpaper.qml index 02aa524..016a371 100644 --- a/Wallpaper.qml +++ b/Wallpaper.qml @@ -211,7 +211,7 @@ Item { target: "displaywright" function reload(): string { - configFile.reload() + root.reloadConfig() root.refreshSpanBox() return "ok" }