feat: Update omarchy-menu-keybindings to work with submaps #4104
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.
Submaps
Submaps are a feature of hyprland where you enter an alternate mode that creates a new set of keybindings.
The keybindngs are associated with a corresponding submap name such as "remote" or "gamemode".
In this mode only newly defined keybinds are available while the default keybinds are disabled, until the user exits the submap and returns to the default keybinds.
Why is this Useful?
Some keybindings interfere with GUI/TUI apps because they capture and interpret the key combinations instead of forwarding them down to the underlying application. See discussion here.
Some keybindings may also interfere with gaming because combinations are too close to something that may terminate the application (consider ALT+W vs SUPER+W).
Why is this necessary?
Although it's possible to make use of submaps without modifying
bin/omarchy-menu-keybindings, the existing operation will print keybindings across all submaps, including duplicates, even when some key combinations are not available within the context of the currently selected submap.Example of Using a Submap
Easiest is to modify
~/.config/hypr/bindings.confas in the linked discussion.