Use dynamic bindings list in omarchy-menu-keybindings (#300)

* fix: Use dynamic bindings list in omarchy-menu-keybindings

We can use `hyprctl binds` to get a dynamic list of the currently-set
key bindings. This allows for a custom user configuration that is
split into arbitrary config files, and which makes use of `unbind` to
remove default Omarchy key bindings.

* chore: Support optional description for key bindings

If the description is present, use it in the key
bindings menu, instead of displaying some version
of the dispatched command.

* chore: Add some key binding description strings
This commit is contained in:
Simon Dawson
2025-08-03 10:11:29 +01:00
committed by GitHub
parent 8ed29e6ce1
commit 8f3647c5c5
6 changed files with 142 additions and 121 deletions

View File

@ -1,41 +1,41 @@
# Close window
bind = SUPER, W, killactive,
bindd = SUPER, W, Close active window, killactive,
# Control tiling
bind = SUPER, J, togglesplit, # dwindle
bindd = SUPER, J, Toggle split, togglesplit, # dwindle
bind = SUPER, P, pseudo, # dwindle
bind = SUPER, V, togglefloating,
bind = SHIFT, F11, fullscreen, 0
bindd = SUPER, V, Toggle floating, togglefloating,
bindd = SHIFT, F11, Full screen, fullscreen, 0
# Move focus with mainMod + arrow keys
bind = SUPER, left, movefocus, l
bind = SUPER, right, movefocus, r
bind = SUPER, up, movefocus, u
bind = SUPER, down, movefocus, d
bindd = SUPER, left, Move focus left, movefocus, l
bindd = SUPER, right, Move focus right, movefocus, r
bindd = SUPER, up, Move focus up, movefocus, u
bindd = SUPER, down, Move focus down, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = SUPER, code:10, workspace, 1
bind = SUPER, code:11, workspace, 2
bind = SUPER, code:12, workspace, 3
bind = SUPER, code:13, workspace, 4
bind = SUPER, code:14, workspace, 5
bind = SUPER, code:15, workspace, 6
bind = SUPER, code:16, workspace, 7
bind = SUPER, code:17, workspace, 8
bind = SUPER, code:18, workspace, 9
bind = SUPER, code:19, workspace, 10
bindd = SUPER, code:10, Switch to workspace 1, workspace, 1
bindd = SUPER, code:11, Switch to workspace 2, workspace, 2
bindd = SUPER, code:12, Switch to workspace 3, workspace, 3
bindd = SUPER, code:13, Switch to workspace 4, workspace, 4
bindd = SUPER, code:14, Switch to workspace 5, workspace, 5
bindd = SUPER, code:15, Switch to workspace 6, workspace, 6
bindd = SUPER, code:16, Switch to workspace 7, workspace, 7
bindd = SUPER, code:17, Switch to workspace 8, workspace, 8
bindd = SUPER, code:18, Switch to workspace 9, workspace, 9
bindd = SUPER, code:19, Switch to workspace 10, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = SUPER SHIFT, code:10, movetoworkspace, 1
bind = SUPER SHIFT, code:11, movetoworkspace, 2
bind = SUPER SHIFT, code:12, movetoworkspace, 3
bind = SUPER SHIFT, code:13, movetoworkspace, 4
bind = SUPER SHIFT, code:14, movetoworkspace, 5
bind = SUPER SHIFT, code:15, movetoworkspace, 6
bind = SUPER SHIFT, code:16, movetoworkspace, 7
bind = SUPER SHIFT, code:17, movetoworkspace, 8
bind = SUPER SHIFT, code:18, movetoworkspace, 9
bind = SUPER SHIFT, code:19, movetoworkspace, 10
bindd = SUPER SHIFT, code:10, Move window to workspace 1, movetoworkspace, 1
bindd = SUPER SHIFT, code:11, Move window to workspace 1, movetoworkspace, 2
bindd = SUPER SHIFT, code:12, Move window to workspace 1, movetoworkspace, 3
bindd = SUPER SHIFT, code:13, Move window to workspace 1, movetoworkspace, 4
bindd = SUPER SHIFT, code:14, Move window to workspace 1, movetoworkspace, 5
bindd = SUPER SHIFT, code:15, Move window to workspace 1, movetoworkspace, 6
bindd = SUPER SHIFT, code:16, Move window to workspace 1, movetoworkspace, 7
bindd = SUPER SHIFT, code:17, Move window to workspace 1, movetoworkspace, 8
bindd = SUPER SHIFT, code:18, Move window to workspace 1, movetoworkspace, 9
bindd = SUPER SHIFT, code:19, Move window to workspace 1, movetoworkspace, 10
# Swap active window with the one next to it with mainMod + SHIFT + arrow keys
bind = SUPER SHIFT, left, swapwindow, l
@ -58,6 +58,5 @@ bind = SUPER, mouse_down, workspace, e+1
bind = SUPER, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = SUPER, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow
bindmd = SUPER, mouse:272, Move window, movewindow
bindmd = SUPER, mouse:273, Resize window, resizewindow