2 set -g default-terminal 'xterm-256colour'
4 # Set scrollback buffer to 10000
5 set -g history-limit 10000
7 # remap prefix from 'C-b' to 'C-z'
9 set-option -g prefix C-a
10 bind-key C-a send-prefix
12 # split panes using | and -
13 bind c new-window -c $HOME
14 bind | split-window -h -c "#{pane_current_path}"
15 bind - split-window -v -c "#{pane_current_path}"
16 bind-key C-a last-window
22 set -g status-justify left
23 set -g status-interval 2
26 set-option -g visual-activity off
27 set-option -g visual-bell off
28 set-option -g visual-silence off
29 set-window-option -g monitor-activity off
30 set-option -g bell-action none
32 set -g default-terminal "screen-256colour"
36 setw -g clock-mode-colour colour135
37 setw -g mode-style fg=colour196,bg=colour238,bold
42 set -g pane-border-style fg=colour238,bg=colour235
43 set -g pane-active-border-style fg=colour51,bg=colour236
48 set -g status-position bottom
49 set -g status-style fg=colour137,bg=colour234,dim
52 set -g status-left-length 20
54 set -g status-right '#[fg=colour233,bg=colour245,bold] %H:%M #[fg=colour233,bg=colour253,bold] %m-%d '
55 set -g status-right-length 50
57 setw -g window-status-current-style fg=colour69,bg=colour253,bold
58 setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour233]#W#[fg=colour69]#F '
60 setw -g window-status-style fg=colour131,bg=colour245,none
61 setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour233]#W#[fg=colour131]#F '
63 setw -g window-status-bell-style fg=colour255,bg=colour1,bold
68 set -g message-style fg=colour232,bg=colour166,bold
69 set -g message-command-style fg=blue,bg=black
72 # Smart pane switching with awareness of Vim splits.
73 # See: https://github.com/christoomey/vim-tmux-navigator{
74 is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
75 | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
76 bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
77 bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
78 bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
79 bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
80 tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
81 if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
82 "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
83 if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
84 "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
86 bind-key -T copy-mode-vi 'C-h' select-pane -L
87 bind-key -T copy-mode-vi 'C-j' select-pane -D
88 bind-key -T copy-mode-vi 'C-k' select-pane -U
89 bind-key -T copy-mode-vi 'C-l' select-pane -R
90 bind-key -T copy-mode-vi 'C-\' select-pane -l
93 #enable powerline for tmux
94 #source /usr/lib/python3.8/site-packages/powerline/bindings/tmux/powerline.conf