Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bin/omarchy-menu-keybindings
Original file line number Diff line number Diff line change
Expand Up @@ -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)" || {
Expand Down Expand Up @@ -382,6 +386,7 @@ output_binding_records() {
{
dynamic_bindings
static_bindings
[[ $(type -t user_bindings) == "function" ]] && user_bindings
} |
sort -u |
parse_keycodes |
Expand Down
17 changes: 17 additions & 0 deletions config/omarchy/extensions/keybindings.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 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"
Comment thread
odiguer marked this conversation as resolved.
# }