diff --git a/stow-dotfiles/tmux/.tmux.conf b/stow-dotfiles/tmux/.tmux.conf index 1e876f2..972204b 100644 --- a/stow-dotfiles/tmux/.tmux.conf +++ b/stow-dotfiles/tmux/.tmux.conf @@ -24,23 +24,43 @@ bind C-s send-prefix -2 # # Use :q to select pane by number -bind k select-pane -U -bind j select-pane -D -bind h select-pane -L -bind l select-pane -R +# Use 'q'+number to select pane. Use ; to move the last selected pane. +# bind k select-pane -U +# bind j select-pane -D +# bind h select-pane -L +# bind l select-pane -R # The default key-binding for 'last-window' is 'l'. We change it to 'o', # because we have bound 'l' to 'select-pane'. -bind o last-window +# bind o last-window -bind -r K resize-pane -U 5 -bind -r J resize-pane -D 5 -bind -r H resize-pane -L 5 -bind -r L resize-pane -R 5 +# The default key-binding is M-Left, M-Right, M-Up, M-Down. +# bind -r K resize-pane -U 5 +# bind -r J resize-pane -D 5 +# bind -r H resize-pane -L 5 +# bind -r L resize-pane -R 5 # https://superuser.com/questions/343572/how-do-i-reorder-tmux-windows -bind -r C-h swap-window -t -1\; select-window -t -1 -bind -r C-l swap-window -t +1\; select-window -t +1 +bind -r H swap-window -t -1\; select-window -t -1 +bind -r L swap-window -t +1\; select-window -t +1 + +# current pane full screen toggle +bind o resize-pane -Z +# Maximize the current pane +bind _ if-shell -F '#{==:#{PANE_VERTICAL},true}' { + resize-pane -y 70% + setenv -g PANE_VERTICAL false +} { + resize-pane -y 100% + setenv -g PANE_VERTICAL true +} +bind | if-shell -F '#{==:#{PANE_HORIZONTAL},true}' { + resize-pane -x 70% + setenv -g PANE_HORIZONTAL false +} { + resize-pane -x 100% + setenv -g PANE_HORIZONTAL true +} # Join the last active pane to the current window bind W "join-pane -s !"