Conversation
The keybindings menu could list Lua function binds but could not run them. Replaying the Lua config produces no dispatcher expression for a plain function, so selecting Reset zoom from Super + K exited 1 without changing the zoom level. The same bug affects five default bindings and user binds that use functions. When no source expression exists, record the bind identity reported by Hyprland. At dispatch time, reread `hyprctl binds` and require exactly one bind with that identity. Call its current registry ref only when the ref is numeric; refuse blank refs, duplicate matches, missing matches, and failed bind queries. Bump the cache version from v13 to v14 so records with blank dispatchers are rebuilt. Keep the comma-delimited record framing unchanged because commas in keys or descriptions already break every bind kind and need a separate change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Super + Klists Lua function bindings, but selecting one did nothing. For example, a user who zooms in, searches forReset zoom, and presses Enter gets no reset or message; the script exits 1. Five of the 232 default bindings on Omarchy 4.0.2 are affected:Zoom in,Reset zoom, and the three universal clipboard actions. User-defined function binds have the same failure.The menu replays the Lua config to recover each action, but a plain Lua function leaves no expression to replay. Hyprland reports these binds as
__luawith a registry ref. When an expression is available from the source, the expression still wins. Otherwise, the menu records the bind's modifier mask, submap, key, keycode, and description.A config reload can assign the same registry ref to a different function. At dispatch time, the menu rereads
hyprctl bindsand requires exactly one__luabind to match the recorded identity. The menu calls the ref currently attached to that bind through the existinghl.dispatchpath, and refuses a blank or nonnumeric ref. The cache version moves fromv13tov14so cached rows with blank dispatcher fields are rebuilt.PR #11733 is a broader rewrite of the keybindings scan across 11 files. This PR keeps that work separate and fixes the current script.
Testing
bash test/shell.d/keybindings-menu-test.sh: all 22 assertions passed (15 existing and 7 new).bash test/shell.d/bin-style-test.sh: passed.git diff --check: passed.Reset zoomthrough the patched script changedzoom_factorfrom 2 to 1../test/cli: passed../test/shell: 235 of 238 test files passed. The three failures (config-test.sh,snapper-test.sh, andunowned-system-paths-test.sh) each stop at their first check because they require anomarchy-pkgscheckout that is not present on this machine. All three fail the same way on the unchanged base commitb679363b.Not included
The comma-delimited binding record format remains unchanged. A description or key containing a comma already breaks the row for every bind kind, and none of the shipped defaults has one. Reworking the record framing would also require changes to
parse_binding_records,static_bindings, and every test that reads rendered rows, so that belongs in a separate change.