Skip to content

Group select menu options under headings - #18024

Open
VinhLe1410 wants to merge 3 commits into
omacom:quattrofrom
VinhLe1410:menu-select-headings
Open

VinhLe1410 wants to merge 3 commits into
omacom:quattrofrom
VinhLe1410:menu-select-headings

Conversation

@VinhLe1410

@VinhLe1410 VinhLe1410 commented Nov 7, 2026 •

Copy link
Copy Markdown

What changes

omarchy-menu-select has no way to group options. In a long picker that mixes kinds of rows, I can't tell where one group ends and the next starts. Suggested in #18019.

An option written --heading=<text> now becomes a heading over the options after it:

omarchy-menu-select "Start agent in" \
  --heading="Git repositories" $'\ue702\tapi\tmain' web \
  --heading=Folders notes

A heading uses the panel section header style with a separator line. It is a disabled row, so the cursor, pointer and Enter skip it, and it is never returned. A search hides a heading when no option under it matches. Multi-select ignores headings.

MenuModel.dmenuRows turns the options into rows and handles the search, so menu-test.sh can cover it. The jq filter that builds the payload (#19877) turns each --heading=<text> option into {"heading": "<text>"}.

Verification

  • bash test/shell.d/menu-test.sh: passes, including four new checks for headings, search and returned values. The new checks fail without this change.
  • typing-setup-test.sh, overlay-window-test.sh, menu-plugin-test.sh and menu-guards-test.sh pass.
  • I loaded the branch's Menu.qml and MenuModel.js in my running shell and opened a select menu with three headings. The cursor starts on the first option, and the headings render as in the screenshot.
  • Plain select menus without headings render the same as before.

Screenshots

Before After
Select menu without headings Select menu with headings

@VinhLe1410
VinhLe1410 marked this pull request as ready for review November 7, 2026 13:28
@greptile-apps

greptile-apps Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; no actionable issues remain.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues remain.

Summary

Adds --heading=<text> to group select-menu options.

  • Select menus can group choices under headings.

The earlier heading-clipping concern is addressed. No new actionable issues were found. Visual checks could not run here because Quickshell and a Wayland session are unavailable.

Reviews (3) · Last reviewed commit: "Merge remote-tracking branch 'upstream/q..." · Reviewed by Greptile

Comment thread shell/plugins/menu/Menu.qml Resolved
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.

2 participants