From 374d1917000083f9f4f2b2d982fcc134a58e25cf Mon Sep 17 00:00:00 2001 From: Buttercup Roberts Date: Tue, 15 Sep 2026 11:11:42 +0200 Subject: [PATCH 01/18] feat(04-01): add --default-index plumbing through the menu select payload - bin/omarchy-menu-select parses --default-index N after -- and emits an optional defaultIndex integer in the select-mode payload, only when passed - MenuModel.dmenuDefaultIndex resolves the field into [0, count-1] as a node-testable helper; openDmenu initializes selectedIndex from it before rebuildDisplay(), so the existing clamp bounds out-of-range values - typing in the filter still resets the highlight to row 0 (initial-only, documented in setFilter and docs/menu.md) - test/shell.d/menu-select-test.sh proves the field reaches the payload end to end via a handshake-satisfying omarchy-shell stub --- bin/omarchy-menu-select | 14 +++- docs/menu.md | 6 ++ shell/plugins/menu/Menu.qml | 6 +- shell/plugins/menu/MenuModel.js | 15 ++++- test/shell.d/menu-select-test.sh | 106 +++++++++++++++++++++++++++++++ test/shell.d/menu-test.sh | 39 ++++++++++++ 6 files changed, 183 insertions(+), 3 deletions(-) create mode 100644 test/shell.d/menu-select-test.sh diff --git a/bin/omarchy-menu-select b/bin/omarchy-menu-select index 1404665f30d0..3ca92c72360d 100755 --- a/bin/omarchy-menu-select +++ b/bin/omarchy-menu-select @@ -11,6 +11,8 @@ # menu shows the glyph but never returns it. A plain option returns the label # alone; an option with a subtext returns "