From c581d4867619ce93c6a931d0790e2890b92a5363 Mon Sep 17 00:00:00 2001 From: Smirnov Oleksandr Date: Mon, 10 Apr 2023 18:39:20 +0300 Subject: [PATCH] update tmux config --- tmux.conf | 65 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 28 deletions(-) diff --git a/tmux.conf b/tmux.conf index 8c72732..75cd8e4 100644 --- a/tmux.conf +++ b/tmux.conf @@ -1,50 +1,59 @@ -set -sg escape-time 0 # ESC time out -set -g prefix C-a # Prefix -set -g mouse on # Mouse support +set -g default-terminal "screen-256color" +set-option -g status-position top + +set -g mouse on +set -sg escape-time 0 -# Set base index set -g base-index 1 set -g pane-base-index 1 -# Colors -set-option -sa terminal-overrides ",*:Tc" +set -g pane-border-style fg=colour240 +set -g pane-active-border-style fg=colour39 +set-window-option -g window-status-current-style fg=colour39 +set-window-option -g mode-keys vi +bind-key -T copy-mode-vi 'v' send -X begin-selection +bind-key -T copy-mode-vi 'y' send -X copy-selection +unbind -T copy-mode-vi MouseDragEnd1Pane -#== Keys +# set prefix +set -g prefix C-r +unbind C-b +bind-key C-r send-prefix + +# keys bind r source-file ~/.tmux.conf \; display 'Reloaded tmux config' - - -# Change pane +bind Tab last-window +# split window +bind _ split-window -v +bind - split-window -h +# move windows +bind-key i swap-window -t -1 +bind-key o swap-window -t +1 +# change focus bind -r h select-pane -L bind -r j select-pane -D bind -r k select-pane -U bind -r l select-pane -R - -# Resize pane +# resizing panes bind -r H resize-pane -L 2 bind -r J resize-pane -D 2 bind -r K resize-pane -U 2 bind -r L resize-pane -R 2 -# Window move -bind-key i swap-window -t -1 -bind-key o swap-window -t +1 - -## Create window -bind _ split-window -v -bind - split-window -h - -## Change focus on last window -bind Tab last-window - -#== Status bar +# status bar set -g status-right ' #{?client_prefix,*,} #S ' set -g status-left ' ' set -g status-bg default set -g status-fg colour254 set -g status-style fg=colour110 -#== Pane border colors -set -g pane-border-style fg=colour240 -set -g pane-active-border-style fg=colour39 -set-window-option -g window-status-current-style fg=colour39 +# plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'tmux-plugins/tmux-continuum' + +set -g @resurrect-capture-pane-contents 'on' +set -g @continuum-restore 'on' + +run '~/.tmux/plugins/tpm/tpm'