From 865ee21b8fcf2bc431797b2233e854f5bbc4d1cc Mon Sep 17 00:00:00 2001 From: Martin Lasson Date: Thu, 30 Jan 2025 20:51:30 +0100 Subject: [PATCH] Change keybinds to they work for colemak and qwerty hjkl usage --- tmux/.tmux.conf | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 3f590ef..5fde9a2 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -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 '%%''"