Bar widget settings revert after any plugin reload: the delta patches the item, not the slot
System details
ASUS Zenbook S16 UM5606WA, AMD Ryzen AI 9 HX 370 / Radeon 890M, Omarchy 4.0.0-1, two displays
What's wrong?
Changing an inline bar widget setting in shell.json works, and then silently undoes itself the next time that widget is re-created — which any plugin reload does, including a plugin that isn't in the bar. shell.json keeps the new value, so the file and the bar quietly disagree, with nothing in the log.
I hit it as a widget rendering differently on my two monitors at the same time, from one config file. Each monitor has its own slot, so they can be re-created at different moments and end up holding different values.
Steps to reproduce
- Give any bar widget an inline setting in
shell.json(e.g.{"id": "omarchy.clock", "format": "HH:mm"}). - Change that setting. The bar picks it up.
touchany file in any installed plugin under~/.config/omarchy/plugins/.- The widget goes back to the value it had when the layout was last built.
shell.jsonstill holds the new one.
Expected: a widget renders what shell.json says, however many times its item is re-created.
Visual:
Cause
ModuleSlot derives its settings from the entry the delegate captured at creation (shell/plugins/bar/Bar.qml:1533), and applySettingsDelta() (:376) deliberately skips the rebuild — it swaps the entry in the array and patches the live item only:
var item = slot.activeItem
if (item && "settings" in item) item.settings = settings
slot.entry still points at the old object, so moduleSettings stays stale and injectProps() re-injects it on the next re-creation.
The same guard has a second effect: a slot whose item is the emptyModuleComponent placeholder — which is what every slot falls back to while a plugin reloads — has no settings property, so a write landing in that window is skipped outright and never applied to anything. Sweeping the offset between a reload starting and the write, on stock 4.0.0-1:
offset what the widget reported outcome
0.1s R1 -> UNSET -> BASE applied, then rolled back
0.3s UNSET -> BASE never applied at all
0.6s UNSET -> BASE -> R3 applied and kept
Fix
I have a fix ready — +10/-1 in Bar.qml, plus a regression test in test/shell.d/ that reproduces this against a throwaway shell instance the way runtime-smoke-test.sh does. It fails on quattro HEAD and passes with the change. PR to follow; happy to leave it to you instead if you would rather take it a different way.
Related, not duplicates
- #7635 and #6503 are in the same function,
injectProps(), but are the read-onlymoduleNamebug rather than this one. I hit those warnings too and am not re-reporting them.
Diagnostics
Left out deliberately: omarchy-debug --no-sudo --print is 38k lines here, and this is a logic bug in the bar that reproduces from a config change plus a plugin reload on any machine — the hardware section wouldn't say anything. Happy to run omarchy-debug interactively and post the logs.omarchy.org URL (24h expiry) if you'd like it on the record.
Small thing noticed while gathering it: omarchy debug --no-sudo --print, which agents/skills/omarchy/contributing.md recommends, isn't routed on 4.0.0-1 — omarchy commands rejects it. The omarchy-debug binary works.
Reproduced on a disposable VM running Omarchy 4.0.0-1 with the compositor serving quattro. Both effects you describe check out, at the lines you cite.
Effect one. applySettingsDelta() writes the new entry into layoutConfig[region][index] (Bar.qml:379) but never bumps barConfigSerial, and an in-place write into a plain JS array notifies no Repeater — so an already-created delegate keeps the modelData it captured, moduleSettings (:1533) stays bound to the old object, and injectProps() (:1750) re-injects it on the next re-creation. And any local plugin write re-creates every bar widget rather than that plugin's: reloadPlugins() calls unloadPluginWidgets() (shell.qml:734), which unregisters every registered widget, and Omarchy's own widgets are plugins too — flagged __isFirstParty — so your omarchy.clock example is accurate.
Effect two. Also real. While the reload is in flight registryComponent is null (Bar.qml:1538), the slot renders emptyModuleComponent (:1149, an Item with no settings property), and the if (item && "settings" in item) guard at :385 drops the write with nothing that re-applies it afterwards.
The two-monitor symptom, reproduced. A probe bar widget with an inline setting, a second output added mid-run, then a touch on a plugin that is not in the bar. With shell.json reading BRAVO, Virtual-1 reported ALPHA and HEADLESS-1 reported BRAVO at the same moment, from that one file — the second monitor's slot was created after the in-place mutation and captured the new entry, the first monitor's was re-created from the stale one. For the placeholder window I held it still instead of racing it: an entry in the layout whose plugin was not installed yet, so its slot sat on emptyModuleComponent. Changing its setting and then installing the plugin brought the widget up on the old value on both monitors, with the new one still in shell.json.
Where it came from. 1f10c78c "Patch settings-only bar config changes in place instead of rebuilding every widget", shipped in v4.0.0-beta3 and v4.0.0. Before it applyBarConfig() always reassigned layoutConfig and bumped the serial, so every delegate was rebuilt from the current entry and this could not happen.
On your PR. I ran the same reproduction against a tree carrying the Bar.qml half of #7692, and it closes both effects: BRAVO on both monitors after the reload, and the placeholder-window write lands. Setting slot.settingsOverride before the "settings" in item guard is what covers the second one, which was the part worth checking. I also looked for the case where a stale override could shadow a later structural write — one shell.json write that both changes the setting and adds a widget — and the widget follows the file, because normalizeLayout deep-clones entries (Util.qml:117), so the rebuilt delegate gets a new entry and onEntryChanged drops the override. bar-test.sh and runtime-smoke-test.sh stay green on that tree.
#7754 ("Avoid full plugin reload when discovering new plugins") changes how often this fires without touching it. It diverts only the first sighting of a plugin id this session to a discovery path, so omarchy plugin add stops re-creating existing widgets; a change to an already-installed plugin — your step 3 — still hits localPluginReloadTimer.restart() and the full reload. It edits shell.qml and bin/omarchy-plugin-add only, so there is no conflict with #7692 either way round.
Second opinion. codex at xhigh was given the same question and the diff, and agreed on both effects and on #7692 closing both, finding no missed settings path in the cases it was asked to break. It contributed the deep-clone in Util.qml as the reason a stale override cannot shadow a structural change. Its independence is not guaranteed here — it agreed with conclusions this review had already reached.
One aside on your note. omarchy debug --no-sudo --print routes and runs on a clean 4.0.0-1 worker and omarchy commands lists it, and nothing in bin/omarchy or bin/omarchy-debug has changed since v4.0.0 — so that one may be worth checking against what omarchy resolves to in your PATH. The doc that recommends it is default/agents/skills/omarchy/contributing.md.
Next: this is waiting on the maintainer to look at #7692. Nothing needed from you, and thank you for the diagnosis — the file:line in the report was right and made this quick to confirm.
Still present on omarchy 4.0.4-1 (quickshell 0.3.1-1, Hyprland 0.56.2), with the same cause: applySettingsDelta() (Bar.qml:602-614) patches the running item, and ModuleSlot.moduleSettings (Bar.qml:1779) is still computed from the slot's original entry, so injectProps() (Bar.qml:1995-2005) hands a reloaded widget the old settings.
We hit it in a third-party bar widget that edits its own settings with updateEntryInline(). After a Save and a hot reload of the plugin, the widget got its pre-Save settings while shell.json held the new ones. A Save made from that state would have written the old values back over the user's edits. Our workaround is to read the plugin's own entry from shell.json with a watched FileView instead of trusting settings.
Re-checked against current quattro (7e7a5600a) after the report that this is still present on 4.0.4. The mechanism is unchanged: applySettingsDelta() (shell/plugins/bar/Bar.qml:689) still swaps the entry in layoutConfig and patches only a live item that has a settings property, ModuleSlot.moduleSettings (:1913) is still derived from the entry the slot was created with, and injectProps() (:2142) hands that stale value to any re-created widget. None of those, nor BarModel.inlineSettingsDelta(), has changed since #7692 was opened.
@bandoyer, your path is the same bug, not a second one. shell.updateEntryInline() (shell/shell.qml:1099) rewrites the widget's entry in bar.layout and persists shell.json, the new barConfig reaches applyBarConfig(), and a settings-only change takes the same applySettingsDelta() shortcut. The plugin hot reload then re-creates the widget from the old entry. #7692's change, setting slot.settingsOverride in applySettingsDelta() and preferring it in moduleSettings, covers that write the same way it covers a hand edit of shell.json. Its two Bar.qml hunks still apply to current quattro unchanged, and the branch merges cleanly. Your workaround of reading the entry from shell.json is sound in the meantime.
This was a source check, not a new run. The bug was already reproduced on a worker, and #7692 was verified on one against an earlier quattro.
Second opinion: Codex Medium, given the same questions, found the same: the mechanism is unchanged, updateEntryInline() reaches applySettingsDelta(), and #7692 covers that path. Independence is not guaranteed, because it was confirming conclusions already written down here.
Next: this waits on the maintainer's decision on #7692, which closes this issue when it merges. Nothing is needed from either reporter.
Still present on Omarchy 4.0.6-1 (Quickshell 0.3.2, Qt 6.12.0), and observed here as actual data loss, not only as stale settings.
Reproduction with the jrmmhm.pocket bar plugin, which keeps its members, pinned and locked lists in its own entry and writes them with updateEntryInline():
omarchy restart shell.- Drag a widget onto the pocket. The pocket writes the new
memberslist inline;shell.jsonand the running widget both have it. omarchy-shell shell rescanPlugins. The re-created pocket is injected thememberslist from step 1, so the new member is no longer held.- Click the pocket to pin it. Its write is built from the injected (stale) settings, and
updateEntryInline()replaces the whole entry, so the member added in step 2 is gone fromshell.jsontoo.
The same happened with pinned: a pin released after the shell start was back after the reload, and held the pocket open.
Verified on main (81c9049) of the plugin, 3 of 3 runs for a pin set after the shell start, 2 of 2 for a pin released, 1 of 1 for a member dragged in. #7692 would close it; until then the plugin will read its own entry from shell.json, as suggested above.
Filed by Claude Opus 5.5 via Claude Code.
This is fixed on quattro by b7e900ced, "Rework bar dragging, sections and widget orientation" (#15517). That fix is in v4.5.0-rc1 and v4.5.0-rc2. No 4.0.x release has it, so on 4.0.6, as @jrmmhm reports, the bug is still there.
#15517 removes applySettingsDelta() completely. Each bar widget's host now reads its entry from the current layout (WidgetHost.entry, shell/plugins/bar/Bar.qml:2710), and moduleSettings is derived from that entry (:2720). BarModel.layoutWidgets() keeps the old entry object only when the new one has identical JSON (shell/plugins/bar/BarModel.js:386). So a settings change replaces the entry the host reads, and it is injected again on every reload (Bar.qml:2789-2834). Nothing holds on to the entry from when the layout was built. A widget that registers after the write gets the current value too. updateEntryInline() (shell/shell.qml:1108) goes through the same path: it sets the new shellConfig, then applyBarConfig() runs. That covers the pocket plugin's data loss and @bandoyer's case as well.
I ran #7692's regression test on a disposable Omarchy VM, against v4.0.6 and against current quattro (e2c7007c1). I made three changes to the test's harness only, none to what it asserts: a link to default/, a ping loop that really waits for the shell, and a UTF-8 locale so the probe's IPC reply isn't mixed with a Qt warning. On v4.0.6 it fails at the reported step: after an unrelated plugin reloads, the probe widget is back on ALPHA while shell.json says BRAVO. On quattro all four checks pass, including the one where the change is made while the slot has no widget yet.
Second opinion: Codex Medium and muse-wonder (via pi, thinking high) each traced the quattro source separately. Both found the bug fixed for hand edits of shell.json and for updateEntryInline(). They also checked key reuse, the drag path, duplicate ids, the tray drawer and custom entries, and neither found another path that brings back stale settings. Codex confirmed the fixing commit and the tags that contain it; muse-wonder could not run git and did not answer that part. Both pointed out a separate limitation for plugin authors, not this bug: updateEntryInline() replaces the whole entry for every widget with that id and does not merge. A widget that writes from a private copy of its settings can still overwrite newer fields. Writing from the live settings at the moment of the write avoids that.
Next: this is for the maintainer to close as fixed in 4.5.0. #7692's author has offered to cut that pull request down to just the regression test. Nothing is needed from the reporters. Until 4.5.0 is out, reading the entry from shell.json remains the workaround on 4.0.x.