From 29feea01f4f0f96f067eb9ce21a77c68141e9c30 Mon Sep 17 00:00:00 2001 From: Olivier Diguer Date: Mon, 15 Jun 2026 19:58:24 -0400 Subject: [PATCH 1/2] add user-defined keybindings extension for keybindings menu Allow users to add custom keybindings to the Super + K keybindings menu via ~/.config/omarchy/extensions/keybindings.sh Gives the ability to add static menu entries for app keybindings that are not picked up automatically and/or not in omarchy's default static bindings. --- bin/omarchy-menu-keybindings | 5 +++++ config/omarchy/extensions/keybindings.sh | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 config/omarchy/extensions/keybindings.sh diff --git a/bin/omarchy-menu-keybindings b/bin/omarchy-menu-keybindings index 78435e7693..314f7ddbe9 100755 --- a/bin/omarchy-menu-keybindings +++ b/bin/omarchy-menu-keybindings @@ -26,6 +26,10 @@ declare -A FALLBACK_KEYCODE_SYM_MAP=( # source-derived key cache so the menu can still show those bindings. declare -A LUA_BIND_KEY_MAP +# Allow user-defined keybinding extensions +USER_EXTENSIONS="$HOME/.config/omarchy/extensions/keybindings.sh" +[[ -f $USER_EXTENSIONS ]] && source "$USER_EXTENSIONS" + build_keymap_cache() { local keymap keymap="$(xkbcli compile-keymap)" || { @@ -382,6 +386,7 @@ output_binding_records() { { dynamic_bindings static_bindings + [[ $(type -t user_bindings) == "function" ]] && user_bindings } | sort -u | parse_keycodes | diff --git a/config/omarchy/extensions/keybindings.sh b/config/omarchy/extensions/keybindings.sh new file mode 100644 index 0000000000..4c5dbf15e9 --- /dev/null +++ b/config/omarchy/extensions/keybindings.sh @@ -0,0 +1,16 @@ +# Add custom keybindings to the Omarchy keybindings menu (Super + K). +# See $OMARCHY_PATH/bin/omarchy-menu-keybindings for the expected output format. +# +# $OMARCHY_PATH/bin/omarchy-menu-keybindings will invoke a user_bindings() +# function in this file if present. +# +# Each line output by user_bindings() must be comma-separated: +# MODIFIERS,KEY,Description +# +# Example: +# user_bindings() { +# echo ",prefix h,Tmux: split pane vertically" +# echo ",prefix v,Tmux: split pane horizontally" +# echo "ALT,1,Tmux: window 1" +# echo "CTRL ALT,Left,Tmux: navigate pane left" +# echo "ALT,1,Tmux: window 1" From cd9991c6902f7ed29241d7561e352078dc3164a2 Mon Sep 17 00:00:00 2001 From: Olivier Diguer Date: Mon, 15 Jun 2026 20:34:26 -0400 Subject: [PATCH 2/2] add missing } bracket in config/omarch/extensions example --- config/omarchy/extensions/keybindings.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/config/omarchy/extensions/keybindings.sh b/config/omarchy/extensions/keybindings.sh index 4c5dbf15e9..bffee86ba1 100644 --- a/config/omarchy/extensions/keybindings.sh +++ b/config/omarchy/extensions/keybindings.sh @@ -14,3 +14,4 @@ # echo "ALT,1,Tmux: window 1" # echo "CTRL ALT,Left,Tmux: navigate pane left" # echo "ALT,1,Tmux: window 1" +# }