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.
32 lines
1.6 KiB
JSON
32 lines
1.6 KiB
JSON
{
|
|
// Extend the Quickshell Omarchy menu with JSONC.
|
|
//
|
|
// IDs are object keys. The parent is inferred from the dotted id, so
|
|
// "personal.notes" appears under "personal", and "personal" appears on the
|
|
// root menu. Reuse an existing id to override/extend it.
|
|
//
|
|
// Fields:
|
|
// icon Nerd Font glyph shown in the icon column.
|
|
// label Visible row title.
|
|
// action Shell command to run. If omitted, the row is a submenu.
|
|
// target Existing submenu id to open. Use for links/aliases.
|
|
// provider Runtime provider function/command returning JSON rows.
|
|
// aliases alternate `omarchy-shell-ipc menu summon <name>` routes; also searchable.
|
|
// keywords Extra search terms beyond id/label/aliases.
|
|
// description Optional subtitle and extra search text.
|
|
// when Shell condition; hide row when it fails.
|
|
// checked Shell condition; append ✓ when it succeeds.
|
|
//
|
|
// Examples:
|
|
// "personal": {"icon":"","label":"Personal","keywords":"notes projects"},
|
|
// "personal.notes": {"icon":"","label":"Notes","action":"omarchy-launch-editor ~/notes","keywords":"notes"},
|
|
// "personal.files": {"icon":"","label":"Files","action":"uwsm-app -- nautilus ~/Documents","keywords":"files documents"},
|
|
//
|
|
// Only use provider when a provider_name function or command named "name"
|
|
// returns JSON rows. Static submenus only need dotted ids.
|
|
//
|
|
// Example: replace the default About action by reusing the same id. Existing
|
|
// fields are kept unless overridden.
|
|
// "about": {"icon":"","label":"About","action":"omarchy-launch-or-focus-tui \"zsh -c 'fastfetch; read -k 1'\""},
|
|
}
|