From c5b241144a65aa2b0048b6f7c9a0d6ec5af8cb40 Mon Sep 17 00:00:00 2001 From: Toby Vincent Date: Sat, 31 Dec 2022 12:34:29 -0600 Subject: feat(tmux): add sway/i3 style window keybinds --- tmux/.config/tmux/tmux.conf | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf index 0d0517e..3d4e728 100644 --- a/tmux/.config/tmux/tmux.conf +++ b/tmux/.config/tmux/tmux.conf @@ -15,7 +15,7 @@ set -g base-index 1 set -g pane-base-index 1 set -g detach-on-destroy off -bind-key -N "Switch last session" C-a switch-client -l +bind-key -N "Switch last session" A switch-client -l bind-key -N "Clock" T clock-mode bind-key -N "Host: new" s run-shell ~/.local/bin/tmux-ssh # bind-key -N "Host: switch" S run-shell ~/.local/bin/tmux-ssh @@ -23,8 +23,18 @@ bind-key -N "Session: new" f run-shell ~/.local/bin/tmux-sessionizer bind-key -N "Session: switch" F run-shell ~/.local/bin/tmux-sessions bind-key -N "Window: new" t new-window bind-key -N "Window: neovim" e new-window -S nvim -bind-key -N "Popup: spotify" m display-popup -w 90% -h 90% -E spt -bind-key -N "Popup: lazygit" g display-popup -w 90% -h 90% -E lazygit + +# i3/sway style window navigation +bind-key '!' if-shell 'tmux swapw -t :1 -d' '' 'movew -t :1' +bind-key '@' if-shell 'tmux swapw -t :2 -d' '' 'movew -t :2' +bind-key '#' if-shell 'tmux swapw -t :3 -d' '' 'movew -t :3' +bind-key '$' if-shell 'tmux swapw -t :4 -d' '' 'movew -t :4' +bind-key '%' if-shell 'tmux swapw -t :5 -d' '' 'movew -t :5' +bind-key '^' if-shell 'tmux swapw -t :6 -d' '' 'movew -t :6' +bind-key '&' if-shell 'tmux swapw -t :7 -d' '' 'movew -t :7' +bind-key '*' if-shell 'tmux swapw -t :8 -d' '' 'movew -t :8' +bind-key '(' if-shell 'tmux swapw -t :9 -d' '' 'movew -t :9' +bind-key ')' if-shell 'tmux swapw -t :0 -d' '' 'movew -t :0' set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' -- cgit v1.2.3-70-g09d2