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