Commit Graph
11 Commits
Author SHA1 Message Date
David Heinemeier Hansson 4e2da8480a Standardize all notification sending 2026-05-17 19:51:29 +02:00
David Heinemeier Hansson 2aa3cae7f7 More menu tweaks 2026-05-16 13:07:31 +02:00
David Heinemeier Hansson 80ab790879 Similar fade on all menus 2026-05-16 12:58:39 +02:00
David Heinemeier Hansson 372f582b3d Loop menu 2026-05-16 12:49:53 +02:00
David Heinemeier Hansson 43a8406d44 We don't need action icons 2026-05-16 12:48:43 +02:00
Ryan Hughes f404a81c6a Consolidate omarchy-shell colors into a single shell.toml surface
Five plugins each owned their own colors.toml watcher with subtly
different parsers, plus two ad-hoc per-theme override files
(notifications.json, image-picker-colors.json). This collapses all of
that into one source of truth: Commons/Color.qml watches colors.toml +
shell.toml and exposes Color.bar.*, Color.popups.*, Color.notifications.*,
Color.menu.*, Color.imagePicker.* for every surface to bind to.

shell.toml is generated by the existing template pipeline from
default/themed/shell.toml.tpl. Themes can ship their own shell.toml to
override individual keys; everything missing falls back to the
foundational palette via root.pick(). Settings panel is intentionally
not themable beyond the foundational tokens.

last-horizon and solitude ship a minimal shell.toml to preserve their
historical 'notification border matches Hyprland active border'
behavior, which previously came from parsing the theme's hyprland.conf
(now removed).
2026-05-16 00:30:27 -04:00
Ryan Hughes 679e14c37f Restore menu toggle behavior on keybinds and bar clicks
The old bash bin short-circuited with close_visible_quickshell_menu at
the top of open_quickshell_menu, so pressing any menu keybind while the
menu was open just closed it. The IPC path I introduced summoned every
time, so keyboard shortcuts couldn't dismiss \u2014 only outside clicks did
(which is why the bar icon appeared to toggle: clicking it while the
menu was open hit the menu's outer-click MouseArea, not the icon).

Add a menu.toggle IPC method:
  - if root.opened: cancel() and return "closed"
  - otherwise: behaves exactly like summon

Switch every Hyprland binding and the two bar-icon click handlers
(omarchy logo, battery right-click \u2192 power menu) to toggle. summon stays
as the always-open primitive for callers that want explicit summon
semantics (rare \u2014 right now nothing internal uses it).
2026-05-14 18:04:25 -04:00
Ryan Hughes edfd68d48e Strip the bash-bin compatibility layer from Menu.qml
With bin/omarchy-menu gone there's no caller that summons the menu by
writing a JSON tempfile and polling a done file. Drop everything that
existed only to support that handshake:

  - menuJsonFile / menuJsonFileView / loadMenuJson / openMenu(json,...)
  - pendingSelectionFile / pendingDoneFile / selectionFile / doneFile
  - mergeProviderJson (the JSON-wrapper for provider output)
  - applyProc / releaseProc / doneFilesToRelease / finishDoneFile /
    releaseNextDoneFile / resetRequest / requestActive / closeMenu
  - the menuBin property pointing at the deleted bin

applySelected is now four lines (close + execDetached); cancel is two
(close + clear filter). open() takes either {menu: id} or a bare initial
menu name, and hands off to openExistingMenu which uses the cached items
from the JSONC FileViews.

Net: 91 lines smaller, no perf change.
2026-05-14 17:45:53 -04:00
Ryan Hughes a960d2b1bf Move omarchy-menu data and dispatch into the shell
omarchy-menu used to spawn an 821-line bash bin on every keybind: 11 jq
invocations against omarchy-menu.jsonc, mktemp dance, summon, poll. The
shell waited ~235ms (keybind to visible) before painting the first row.

The bar plugin host is already a persistent process with the menu plugin
loaded (keepLoaded: true) — it just wasn't allowed to own the menu data.
Now it does:

  - parseMenuJsonc / normalizeItem ports the bash bin's jq pipeline to
    JS: strip // comments + trailing commas, infer parent from dotted
    ids, dedupe keyword tokens across id/aliases/keywords, fill defaults.
  - Two FileViews with watchChanges: true on the default and user
    extension JSONCs. Edit either file and the in-memory item map
    refreshes without a restart.
  - IpcHandler exposes menu.summon(initialMenu) / refresh() / close() /
    ping(). summon resolves aliases the way the old bash route_target
    did, including the leaf-alias-is-an-action shortcut.
  - Action dispatch is now direct: when summoned via IPC (no selection
    or done file), Quickshell.execDetached(['bash','-lc', action]) runs
    the action and the menu closes. The legacy tempfile dance is kept
    only for the duration of the migration window.
  - provider sub-menus (fonts, power-profiles) are inline: tab-delimited
    bash one-liner per provider, parsed by mergeProviderRows.
  - when:/checked: bash expressions are batched into one Process at
    shell startup (and again whenever the JSONCs change). The menu
    opens instantly; visibility/check marks settle within ~50ms.

Measured: keybind-to-visible via the new IPC path is ~30ms (was ~235ms).
The bash bin still works for now and is removed in the next commit.
2026-05-14 17:39:04 -04:00
Ryan Hughes e54648dfd5 Match Omarchy menu border to Walker 2026-05-14 02:25:05 -04:00
Ryan Hughes 0e135bbb75 Integrate omarchy menu into shell 2026-05-14 02:25:05 -04:00