Simplify omarchy-bar into a bar-settings and bar-plugin split

The omarchy-bar command had grown three overlapping ways to inspect the
bar (show/layout/list/options, plus selected/active/available/widgets
aliases) and mixed layout mutation in with bar-level settings. Untangle
it into two focused commands:

- omarchy-bar keeps only the bar-level settings that write shell.json:
  use, reset, position, transparent, and settings. reset now delegates
  to `use omarchy.bar` rather than duplicating the del(.bar.id) write.
- omarchy-bar-plugin owns all layout mutation: add, move, remove, set,
  and replace, with the placement flags and jq resolve/anchor helpers.
  `omarchy bar plugin ...` routes here via the dispatcher.

Drop the inspection commands entirely: the layout is visible on the bar,
the config is shell.json, and widget/option ids come from
`omarchy plugin list`. Nothing consumed the show output programmatically
except tests. This also removes omarchy-bar-position, whose jq write was
a duplicate of `omarchy bar position`.

Strip environment-invariant guards (require_command, require_omarchy_path)
that defended against jq or OMARCHY_PATH being absent — neither happens on
a real system. Keep the user-input validation (--section/--index) and the
atomic shell.json write.

Update callers (service install/remove, refresh-shell, plugin-clone,
plugin enable), keybindings, the menu, tests, and docs to the new split.
This commit is contained in:
David Heinemeier Hansson
2026-07-17 16:28:17 -07:00
parent f8fec7cccf
commit 182330465a
18 changed files with 604 additions and 841 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ arguments — add `--yes` to skip every prompt (the path for scripts and agents)
You can still install by hand: drop a plugin into
`~/.config/omarchy/plugins/<id>/`, run `omarchy plugin rescan`, then
`omarchy plugin enable <id>` (bar widgets also need `omarchy bar add <id>`;
`omarchy plugin enable <id>` (bar widgets also need `omarchy bar plugin add <id>`;
full bar replacements are selected with `omarchy bar use <id>`).
The lower-level IPC methods remain available through `omarchy-shell shell ...`.