Skip to content

Let the plugin menu pick several plugins at once - #11057

Open
kevinbsr wants to merge 1 commit into
omacom:quattrofrom
kevinbsr:feature/menu-multiselect
Open

kevinbsr wants to merge 1 commit into
omacom:quattrofrom
kevinbsr:feature/menu-multiselect

Conversation

@kevinbsr

@kevinbsr kevinbsr commented Sep 9, 2026

Copy link
Copy Markdown

Enabling, disabling and removing plugins are all things people do to a handful of them in one sitting, and the menu could only ever answer with one, so each extra plugin meant walking the same three-level menu again.

Multi-select in the menu's select surface

omarchy-menu-select ... -- --multi adds multiSelect: true to the summon payload and turns the list into a multi-picker:

  • Tab ticks the row under the cursor, Enter confirms, Escape still discards everything
  • a checkbox trails every row, and the prompt line reports the tally (Tab to select → 2 selected)
  • the answer is one option per line, in the order the caller passed them rather than the order they were ticked
  • ticks are keyed by the value the row would return, so a row stays ticked while the search narrows the list around it and comes back when the filter clears
  • Enter with nothing ticked returns the row under the cursor, so a caller never has to handle single and multiple picks as separate shapes

Typing goes to the filter here as it does everywhere else in the menu, which is why the toggle is Tab and not Space — plugin names contain spaces.

Plugin picker

omarchy-menu-plugin opens enable, disable and remove as multi-pickers and names the plugins a batch could not act on. Clone still picks one; it ends in an editor. A batch of removals is one terminal, but still one confirmation per plugin, so the destructive path is unchanged per plugin.

Incidental refactor

Two places were parsing the glyph\tlabel\tsubtext option format, and they disagreed on the two-part form. There is now one parseDmenuOption, read by both the rows and the answer — if those drift, a ticked row comes back as something the caller never offered. A test pins the parser to a single call site.

Verification

  • test/shell.d/menu-test.sh (127 assertions) and test/shell.d/menu-plugin-test.sh (17) pass. New coverage: the ordering of the answer, the fallback to the cursor row, the Tab/Enter wiring, the single parser, the --multi payload flag, and — through the existing stub harness — that a batch enables only what was picked, that clone stays single, that a batch of removals is one command per plugin, and that a partial failure is reported rather than silent.
  • ./test/shell otherwise unchanged (the 4 failures on this machine — config, locate, snapper, unowned-system-paths — reproduce on a clean quattro checkout).
  • Verified in the running shell with wtype and screenshots per agents/skills/visual-verification.md: ticking, the tally, a tick surviving a filter narrowing and clearing, the returned value, and that single-select and the ordinary menu are visually unchanged. One fix came out of that pass — the check mark was drawn in the selected row's background and was near-invisible on the cursor row; it now uses the card's own ground, which is a text-contrast pair either way.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VCMPJn3g2jq8ijgCgCDvuc

Enabling, disabling and removing plugins are all things people do to a
handful of them in one sitting, and the menu could only ever answer with
one, so each extra plugin meant walking the same three-level menu again.

Adds a multi-select mode to the menu's select surface, reached with
`omarchy-menu-select ... -- --multi`: Tab ticks the row under the cursor,
a checkbox trails every row, the prompt line reports the tally, and Enter
confirms with one option per line. Ticks are keyed by the value the row
would return, so a row stays ticked while the search narrows the list
around it. Enter with nothing ticked returns the row under the cursor, so
callers never handle single and multiple picks as separate shapes.

Typing goes to the filter here as it does everywhere else in the menu,
which is why the toggle is Tab and not Space.

The plugin picker opens enable, disable and remove as multi-pickers and
names the plugins a batch could not act on. Clone still picks one; it
ends in an editor. A batch of removals is one terminal, but still one
confirmation each, so the destructive path is unchanged per plugin.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VCMPJn3g2jq8ijgCgCDvuc
@jandrusk

Copy link
Copy Markdown

This conflicts with quattro now, so it needs a rebase. One thing to consider while you're in there: batch enable/disable runs omarchy-plugin-enable once per id, and each run ends in its own shell rescan. With a handful of plugins that stacks reloads back to back, which is exactly where the 2s IPC budget runs out (#11115, #11118, #9304). Enabling all the ids first and rescanning once at the end, or at least landing after #11117/#11118, would make the multi-pick much more reliable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants