diff --git a/home/user/.config/tmux/mappings.conf b/home/user/.config/tmux/mappings.conf index a5c07b7..c0cdf4d 100644 --- a/home/user/.config/tmux/mappings.conf +++ b/home/user/.config/tmux/mappings.conf @@ -58,7 +58,7 @@ bind -n M-f resize-pane -Z bind L command-prompt -p "Link window from (session:window):" "link-window -s %% -a" # Join pane -bind C-l command-prompt -p "Join pane from (session:window.pane):" "join-pane -s %%" +bind J choose-window -Z 'join-pane -s "%%"' # Lock screen @@ -77,7 +77,6 @@ bind -n M-j select-pane -D bind -n M-k select-pane -U - # Sync panes bind o if -F '#{pane_synchronized}' 'setw synchronize-panes off' 'setw synchronize-panes on' bind O setw synchronize-panes off @@ -108,6 +107,23 @@ bind -n M-8 new-window -n 8 -S -c "#{pane_current_path}" bind -n M-9 new-window -n 9 -S -c "#{pane_current_path}" bind -n M-0 new-window -n 10 -S -c "#{pane_current_path}" +# Moving pane to window by Alt+Shift+Number +bind -n 'M-!' join-pane -d -t :1 +bind -n 'M-@' join-pane -d -t :2 +bind -n 'M-#' join-pane -d -t :3 +bind -n 'M-$' join-pane -d -t :4 +bind -n 'M-%' join-pane -d -t :5 +bind -n 'M-^' join-pane -d -t :6 +bind -n 'M-&' join-pane -d -t :7 +bind -n 'M-*' join-pane -d -t :8 +bind -n 'M-(' join-pane -d -t :9 +bind -n 'M-)' join-pane -d -t :10 + + +# Swapping windows +bind -r "<" swap-window -d -t -1 +bind -r ">" swap-window -d -t +1 + # Windows splitting bind -n M-Enter split-window -h -l 37% -c "#{pane_current_path}" @@ -123,6 +139,13 @@ bind -n C-M-j resize-pane -D bind -n C-M-k resize-pane -U +# Swappings panes +bind -n C-M-L swap-pane -t '{left-of}' +bind -n C-M-H swap-pane -t '{right-of}' +bind -n C-M-J swap-pane -t '{down-of}' +bind -n C-M-K swap-pane -t '{up-of}' + + # Copy mode setw -g mode-keys vi bind v copy-mode diff --git a/home/user/.config/tmux/style.conf b/home/user/.config/tmux/style.conf index 12ddf52..1906043 100644 --- a/home/user/.config/tmux/style.conf +++ b/home/user/.config/tmux/style.conf @@ -13,6 +13,8 @@ set -g bell-action none set -g message-style "fg=black bg=white bold" +set -g window-style "fg=$_tmux_color_inactive_foreground,bg=$_tmux_color_inactive_background" +set -g window-active-style "fg=$_tmux_color_main_background,bg=$_tmux_color_main_background" set -g mode-style "fg=default,bg=$_tmux_color_menu" @@ -29,8 +31,6 @@ set -g window-status-current-style "bg=white,fg=black bold" set -g window-status-format "#W#{?window_flags,#{window_flags}, }" set -g window-status-current-format "#W#{?window_flags,#{window_flags}, }" set -g window-status-activity-style "bg=$_tmux_color_activity_style" -set -g window-style "fg=$_tmux_color_inactive_foreground,bg=$_tmux_color_inactive_background" -set -g window-active-style "fg=$_tmux_color_main_background,bg=$_tmux_color_main_background" setw -g monitor-activity on @@ -49,4 +49,3 @@ set -g pane-border-lines double set -g pane-border-indicators colour set -g pane-border-style "bg=$_tmux_color_inactive_background" set -g pane-active-border-style "bg=$_tmux_color_inactive_background,fg=$_tmux_color_border" -