Change keybinds to they work for colemak and qwerty hjkl usage

This commit is contained in:
Martin Lasson 2025-01-30 20:51:30 +01:00
parent ac18c36a31
commit 865ee21b8f

View file

@ -6,6 +6,10 @@ bind-key -n M-Left select-pane -L
bind-key -n M-Down select-pane -D
bind-key -n M-Up select-pane -U
bind-key -n M-Right select-pane -R
bind-key -n M-h select-pane -L
bind-key -n M-j select-pane -D
bind-key -n M-k select-pane -U
bind-key -n M-l select-pane -R
# Resize mode
set -g @tmux_resize_mode 0
@ -20,14 +24,18 @@ bind-key -n Up if -F "#{==:#{@tmux_resize_mode},1}" "resize-pane -U" "send-keys
bind-key -n Down if -F "#{==:#{@tmux_resize_mode},1}" "resize-pane -D" "send-keys Down"
bind-key -n Left if -F "#{==:#{@tmux_resize_mode},1}" "resize-pane -L" "send-keys Left"
bind-key -n Right if -F "#{==:#{@tmux_resize_mode},1}" "resize-pane -R" "send-keys Right"
bind-key -n k if -F "#{==:#{@tmux_resize_mode},1}" "resize-pane -U" "send-keys k"
bind-key -n j if -F "#{==:#{@tmux_resize_mode},1}" "resize-pane -D" "send-keys j"
bind-key -n h if -F "#{==:#{@tmux_resize_mode},1}" "resize-pane -L" "send-keys h"
bind-key -n l if -F "#{==:#{@tmux_resize_mode},1}" "resize-pane -R" "send-keys l"
bind-key -n M-p display-message "#{@tmux_resize_mode}"
bind-key -n M-d run-shell "~/.config/tmux/tmux-fuzzy-find-session.sh"
# Split window, change keybindings to match vim concept of splits
bind-key -n M-v split-window -h
bind-key -n M-h split-window -v
bind-key -n M-V split-window -h
bind-key -n M-H split-window -v
bind-key -n M-q kill-pane
bind-key -n M-f resize-pane -Z
bind-key -n M-s command-prompt -p "New session: " "run-shell '~/.config/tmux/tmux-create-session.sh '%%''"