Repository navigation
Conversation
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
c88e6e1 to
aebe1aa
Compare
|
Hi @FizykPSX , Apologies for the long silence on this. I was unwell for a while and had to step away from the project, so I did not get to look at your PR until now. Thank you very much for the contribution, and especially for the thorough write-up. The log trace showing the I will review this properly in the next few days and plan to ship it in the next release. I will follow up here once it is merged. |
Ported into plugin/ from displaywright-shell-plugin#3 and #2, since the repository they were opened against is generated from this directory and would lose them at the next publish. Omarchy 4.0.3 stopped handing third-party plugins the host's private __sourceDir (publicPluginManifest deletes it at shell.qml:320, still there in 4.0.4). Every path this plugin built from it went empty: the service never read wallpapers.json, the overlay never read monitors.lua, and the launcher entry was never installed. Reproduced here on 4.0.4-1 before touching anything -- two displays pinned in the config, `status` reporting theme for both. The three entry files sit at the plugin root, so the directory now comes from Qt.resolvedUrl(".") in each, percent-decoded; LauncherEntry takes it from the service instead of the manifest. Checked offline that the resolved directory matches through both Qt.createComponent and a Loader, and with a space in the path. The startup read is the other half. pluginDir used to arrive after construction and onPluginDirChanged ran before configReader's command binding had re-evaluated, so the reader ran its ["true"] placeholder and read nothing -- pins came back only when the file was next written. pluginDir is a constant now, but the handler still fires during construction, and a probe shows the child's binding has not been evaluated at that moment either. Setting the command at the point the read starts covers both orderings; the comment says why, rather than the reason that stopped being true. The reload IPC also called configFile.reload() on a FileView that no longer exists, so `omarchy-shell displaywright reload` returned an error instead of ok. It calls reloadConfig() now. Version 0.7.4, in the package as well as the manifest, as the last bump did. Co-Authored-By: MACHO MAN <machoxv@protonmail.com> Co-Authored-By: Pawel Waszkiewicz <fizyk@me.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Landed — thank you, and for the write-up on #3 as well. This repository is a generated mirror of Both halves are in: the explicit You're also named in the README's Thanks section. |
displaywright#1 reached the same diagnosis as the mirror's #2 independently, on 4.0.2 with four outputs, and carried the same reload IPC fix. The code that landed came by the other route, but the finding was theirs as well. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
What happens
Pinned wallpapers survive a write to
wallpapers.jsonbut not a shell restart. Afteromarchy restart shell, every pinned display goes back to the theme background, while the config file is still on disk and unchanged.omarchy-shell displaywright statusright after a restart:Touching the file (
touch ~/.config/displaywright/wallpapers.json) restores both displays immediately, which is what made this look like a config problem rather than a load-order one.Why
reloadConfig()is called fromonPluginDirChanged, sincepluginDironly becomes known once the shell injects the manifest into the constructed service. That handler runs before thecommandbinding onconfigReaderhas been re-evaluated, so the Process starts with the["true"]placeholder it holds whilepluginDiris empty.truewrites nothing,StdioCollectorhandsparseConfigan empty string, andmonitorSourcesstays empty — no warning anywhere, because an empty config is a legitimate state.The inotify watcher is unaffected, so the next write to the file loads it correctly. That is why picking a wallpaper works and only a restart shows the bug.
Logging the state at the moment the read is started:
The change
First commit sets
configReader.commandexplicitly inreloadConfig(), so the read is againstconfigPathregardless of which binding pass has run.Second commit is a separate bug found next to it: the
displaywrightIPCreload()still callsconfigFile.reload(), theFileViewthatread-config.shreplaced. The call throws, soomarchy-shell displaywright reloadreturns an error instead ofok.pick-wallpaper.shcalls it to save the watch latency and ignores the failure, so nothing visibly broke — but the IPC target is documented and does not work.Testing
node --test tests/*.mjs— 89 pass, 0 failomarchy restart shellruns, each followed byomarchy-shell displaywright statusshowingpinnedfor both outputs. Before the change the same loop reportedthemefor both every time.omarchy-shell displaywright reloadreturnsok.hyprctl layersstill shows thedisplaywrightsurface aboveomarchy-backgroundon both outputs.🤖 Generated with Claude Code