From ac072c30de6e6afe338a4463df621376e63c5907 Mon Sep 17 00:00:00 2001 From: thek4n Date: Mon, 3 Jun 2024 08:44:15 +0300 Subject: [PATCH] feat(tmux): select-layout mappings --- home/user/.config/tmux/mappings.conf | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/home/user/.config/tmux/mappings.conf b/home/user/.config/tmux/mappings.conf index 81a85cd..aaade0e 100644 --- a/home/user/.config/tmux/mappings.conf +++ b/home/user/.config/tmux/mappings.conf @@ -136,8 +136,11 @@ bind -n 'M-(' if-shell 'tmux join-pane -d -h -t :9' '' 'break-pane -t 9 -d -n 9' bind -n 'M-)' if-shell 'tmux join-pane -d -h -t :10' '' 'break-pane -t 10 -d -n 10' -_tmux_new_pane_size="34%" _tmux_main_pane_size="66%" +_tmux_other_pane_size="34%" + +set -g main-pane-width '$_tmux_other_pane_size' +set -g main-pane-height '100%' # Swapping windows @@ -146,7 +149,7 @@ bind -r ">" swap-window -d -t +1 # Windows splitting -bind -n M-Enter split-window -h -b -l $_tmux_new_pane_size -c "#{pane_current_path}" +bind -n M-Enter split-window -h -b -l $_tmux_other_pane_size -c "#{pane_current_path}" bind -n M-t split-window -v -l 20% -c "#{pane_current_path}" bind \\ split-window -h -c "#{pane_current_path}" bind - split-window -v -c "#{pane_current_path}" @@ -156,7 +159,10 @@ bind - split-window -v -c "#{pane_current_path}" bind -n M-q if-shell 'tmux join-pane -l $_tmux_main_pane_size -h -s stash' '' 'break-pane -d -n stash' # Default layout size -bind -n M-r resize-pane -x $_tmux_main_pane_size +bind -n M-r { + resize-pane -x $_tmux_main_pane_size + select-layout '6c98,213x55,0,0{72x55,0,0,72,140x55,73,0,73}' +} # Swap left pane bind -n M-s swap-pane -t '{left-of}'