-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
77 lines (61 loc) · 2.37 KB
/
tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# set default prefix to Ctrl-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix # make C-a in bash work (double C-a)
#setting the delay between prefix and command
set -sg escape-time 1
# index for windows starts at 1 (default 0)
set -g base-index 1
# index for panes starts at 1 (default 0)
setw -g pane-base-index 1
# increase scroll buffer size
set -g history-limit 5000
# reload tmux conf on "prefix r"
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# splitting panes with | and -
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# New window with default path set to last path
bind c new-window -c "#{pane_current_path}"
# moving between panes with Prefix h,j,k,l
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resizing panes with Prefix H,J,K,L
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# mouse options for tmux 2.1 or higher
set-option -g mouse off
# set 256 color terminal (for vim)
set -g default-terminal "screen-256color"
# status bar
set -g status-left ' #S '
set -g status-right '%h-%d %H:%M | #(whoami)@#(hostname -s)'
# colors: status bar
set -g status-bg colour239
set -g status-fg colour251
set -g window-status-format "#[fg=colour245] #I #W "
set -g window-status-current-format "#[fg=colour39,bold,underscore] #I #W "
# colors: windows
set -g window-style fg=default,bg=default
set -g window-active-style fg=default,bg=default
# colors: pane borders
set -g pane-border-style fg=green,bg=default
set -g pane-active-border-style fg=white,bg=colour235
# fix ssh agent when tmux is detached
setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock
# List of plugins
set -g @plugin 'tmux-plugins/tpm' # plugin manager
set -g @plugin 'tmux-plugins/tmux-sensible' # tmux default
set -g @plugin 'tmux-plugins/tmux-resurrect' # save tmux session across restart
set -g @plugin 'tmux-plugins/tmux-continuum' # auto save
set -g @plugin 'tmux-plugins/tmux-yank' # copy on 'y'
set -g @plugin 'nhdaly/tmux-better-mouse-mode' # better mouse support
set -g @resurrect-strategy-vim 'session' # restore vim
set -g @continuum-save-interval '0' # do not save automatically (val in minutes)
set -g @continuum-restore 'on' # restore automatically
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'