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:
@@ -12,10 +12,10 @@ o.bind("SUPER + ALT + K", "Show Tmux key bindings", "omarchy-menu-tmux-keybindin
|
||||
o.bind("XF86Calculator", "Calculator", "gnome-calculator")
|
||||
|
||||
o.bind_toggle("SUPER + SHIFT + SPACE", "Toggle top bar", "bar")
|
||||
o.bind("SUPER + SHIFT + CTRL + UP", "Move bar to top", "omarchy-bar-position top")
|
||||
o.bind("SUPER + SHIFT + CTRL + DOWN", "Move bar to bottom", "omarchy-bar-position bottom")
|
||||
o.bind("SUPER + SHIFT + CTRL + LEFT", "Move bar to left", "omarchy-bar-position left")
|
||||
o.bind("SUPER + SHIFT + CTRL + RIGHT", "Move bar to right", "omarchy-bar-position right")
|
||||
o.bind("SUPER + SHIFT + CTRL + UP", "Move bar to top", "omarchy-bar position top")
|
||||
o.bind("SUPER + SHIFT + CTRL + DOWN", "Move bar to bottom", "omarchy-bar position bottom")
|
||||
o.bind("SUPER + SHIFT + CTRL + LEFT", "Move bar to left", "omarchy-bar position left")
|
||||
o.bind("SUPER + SHIFT + CTRL + RIGHT", "Move bar to right", "omarchy-bar position right")
|
||||
o.bind("SUPER + CTRL + SPACE", "Background switcher", "omarchy-menu toggle background")
|
||||
o.bind("SUPER + SHIFT + CTRL + SPACE", "Theme menu", "omarchy-menu toggle theme")
|
||||
o.bind("SUPER + BACKSPACE", "Toggle window transparency", "omarchy-hyprland-window-transparency-toggle")
|
||||
|
||||
@@ -95,10 +95,10 @@
|
||||
"style.screensaver": {"icon":"","label":"Screensaver","keywords":"branding"},
|
||||
"style.about": {"icon":"","label":"About","keywords":"branding"},
|
||||
"style.install": {"icon":"","label":"Install","keywords":"theme background font"},
|
||||
"style.bar.top": {"icon":"","label":"Top","keywords":"position","action":"omarchy-bar-position top"},
|
||||
"style.bar.bottom": {"icon":"","label":"Bottom","keywords":"position","action":"omarchy-bar-position bottom"},
|
||||
"style.bar.left": {"icon":"","label":"Left","keywords":"position","action":"omarchy-bar-position left"},
|
||||
"style.bar.right": {"icon":"","label":"Right","keywords":"position","action":"omarchy-bar-position right"},
|
||||
"style.bar.top": {"icon":"","label":"Top","keywords":"position","action":"omarchy-bar position top"},
|
||||
"style.bar.bottom": {"icon":"","label":"Bottom","keywords":"position","action":"omarchy-bar position bottom"},
|
||||
"style.bar.left": {"icon":"","label":"Left","keywords":"position","action":"omarchy-bar position left"},
|
||||
"style.bar.right": {"icon":"","label":"Right","keywords":"position","action":"omarchy-bar position right"},
|
||||
"style.about.text": {"icon":"","label":"Edit Text","keywords":"branding","action":"omarchy-branding-about text"},
|
||||
"style.about.image": {"icon":"","label":"Set From Image","keywords":"branding","action":"omarchy-branding-about image"},
|
||||
"style.about.default": {"icon":"","label":"Restore Default","keywords":"branding","action":"omarchy-branding-about reset"},
|
||||
|
||||
Reference in New Issue
Block a user