plugin enable and bar put report success without placing a widget listed in plugins[]
omarchy plugin enable <id> and omarchy bar put <id> both report success and place nothing when the widget's id is already listed in config.plugins[] but is not on the bar. The shell's own listing keeps reporting the plugin as disabled afterwards, so the two disagree and the user is told the opposite of what happened.
Reproduce
Put a bar-widget's id in plugins in ~/.config/omarchy/shell.json without placing it in bar.layout:
"plugins": [{ "id": "agx.screen-time" }]
Then:
$ omarchy plugin enable agx.screen-time
Enabled agx.screen-time # exit 0
$ omarchy bar put agx.screen-time --section right
agx.screen-time is on the bar # exit 0
$ omarchy-shell shell listPlugins | jq -r '.[]|select(.id=="agx.screen-time")|.enabled'
false
shell.json is byte-identical before and after both commands — neither wrote anything. The widget is not on the bar.
I hit this with three plugins in that state at once (agx.screen-time, oma.nearby, omaconnect, all kinds: ["service", "bar-widget"]). The only way out was editing shell.json by hand, because every command that is supposed to fix it claims it already did.
Cause
PluginRegistry.setEnabled decides whether to place the widget with findEntryLocation:
https://github.com/omacom/omarchy/blob/quattro/shell/services/PluginRegistry.qml#L522
var location = findEntryLocation(config, key)
...
if (!location.found && isBarWidget) {
// ... place it in bar.layout
} else if (!location.found && !isFirstParty) {
config.plugins.push(entry)
}
But findEntryLocation searches bar.layout and config.plugins[]:
https://github.com/omacom/omarchy/blob/quattro/shell/services/PluginRegistry.qml#L242-L246
So a bar-widget sitting in plugins[] reports found: true, both branches are skipped, and setEnabled still returns true — which the CLI prints as success.
The two questions have been conflated. findEntryLocation answers "is this plugin configured anywhere?", but the bar-widget branch needs "is this widget on the bar?" — and inBar() already answers exactly that.
putBarWidget guards with inBar(id) correctly, then delegates to setEnabled and inherits the same conflation:
https://github.com/omacom/omarchy/blob/quattro/shell/services/PluginRegistry.qml#L321-L339
Its "" return means three different things — "already on the bar", "not mine to touch", and "placed it" — so omarchy-bar's "is on the bar" message can't distinguish the no-op from the success it was written for. The comment at bin/omarchy-bar:300 says both outcomes are the same answer to the caller; this is a third outcome wearing the same answer.
Suggested fix
In the bar-widget branch of setEnabled, test bar presence rather than configuration presence — findBarLocation / inBar instead of findEntryLocation — so a widget listed only in plugins[] still gets placed. A widget in both places is arguably worth cleaning up out of plugins[] at the same time.
Happy to send a PR if the direction looks right.
Found while debugging a bar-widget that hosts other widgets. Reported with the help of Claude Code.
Same root cause; adding what's new from a reproduction on Omarchy 4.0.4-1.
Extra trigger: a completely normal disable → re-enable cycle
The two repros here (overlay-only origin; hand-seeded plugins[]) are both paths into the same trap. There is a third, arguably the most common: setEnabled(false) for a bar-widget splices only the bar slot — config.bar.layout[location.section].splice(location.index, 1) at PluginRegistry.qml:556 — and leaves the top-level plugins[] entry behind. That entry is not ornamental: for third-party widgets it holds the persisted config (e.g. finamp stores serverUrl/apiKey there), so it shouldn't be deleted.
Result: disable a bar-widget once, and every subsequent omarchy plugin enable <id> reports success with exit 0 while findEntryLocation keeps returning found: true (kind plugin) and the bar-insertion branch is skipped. The user is stuck exactly as described — the only way out is hand-editing shell.json. This bites on any install that disables and re-enables a configured bar-widget.
Verified one-line fix (running here on 4.0.4-1)
In setEnabled, the bar-widget branch should test bar presence, not configuration presence (the same conflation the report identifies at PluginRegistry.qml:522/528):
- if (!location.found && isBarWidget) {
+ if ((!location.found || (isBarWidget && location.kind === "plugin")) && isBarWidget) {
location.kind === "plugin" means "configured but not on the bar", so the widget gets placed into bar.layout at defaultBarWidgetSection (or the given placement). A widget genuinely on the bar (kind === "bar") still skips to the placement-move logic; a pure-service plugin in plugins[] is untouched.
Verification
Loop run repeatedly through the CLI on the patched build:
$ omarchy plugin disable djc.finamp # bar slot removed; plugins[] entry retained
$ omarchy plugin enable djc.finamp # re-placed in bar.layout.right
$ omarchy plugin list --json # enabled: true
shell.json updated on both operations, the widget's config entry in plugins[] survived intact, and listPlugins()'s enabled (which for a bar-widget checks inBar) now agrees with the CLI's "Enabled" message in every iteration.
Happy to turn this into a PR if useful — the diff is the single line above (blob at the quattro link in the report).
Filed by big-pickle via opencode.
Confirmed, and the cause is the one described here. setEnabled in shell/services/PluginRegistry.qml decided whether to place a widget with findEntryLocation, which also counts a plugins[] entry as found, so a widget listed there without a layout slot was skipped while setEnabled still returned true. Disabling a widget is the everyday way into that state, as @coxdylan7 found: it removes the slot and keeps the plugins[] entry.
I reproduced it on a worker built from the Omarchy ISO with the shell running current quattro: with omarchy.weather only in plugins[], omarchy plugin enable omarchy.weather printed Enabled and omarchy bar put omarchy.weather --section right printed is on the bar, both exiting 0 and leaving shell.json byte-identical.
The fix is up as #15018. It asks the layout directly (findBarLocation) whether the widget is on the bar, and leaves the plugins[] entry alone. On the same worker, both commands now place the widget and listPlugins reports it enabled; the registry contract test gains cases that fail on the old check and pass with the fix, and ./test/cli and the plugin and bar tests show no new failures. Codex Medium reviewed the diagnosis and the fix, agreed with the mechanism, and found an edge case with a malformed bar.id that the final version handles. A second round on that last change could not run because the reviewer's daily budget was spent.
#12534 and #13852 report the same bug, and #15018 closes them too. It is now waiting on the maintainer to review #15018.