-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
107 lines (89 loc) · 3.17 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
## use UTF8 -- this frequently causes problems
#set -g utf8
#set-window-option -g utf8 on
# ----------------------
# Status Bar
# -----------------------
set-option -g status on # turn the status bar on
set -g status-justify centre # center window list for clarity
set -g status-left-length 30
set -g status-left '#[fg=white,bg=red] #H #[default,fg=red] #[default][#S] '
set -g status-right '#[default,fg=cyan]#[fg=white,bg=cyan]#{=/-20/...:pane_current_path} #[fg=black,bg=cyan,bold]#[default,fg=cyan] %d-%b %H:%M '
# Start counting from 1
set -g base-index 1
set-option -g renumber-windows on
# Use emacs keys
set-window-option -g mode-keys emacs
# And override escape timeout from tmux-sensible
set -s escape-time 500
# visual notification of activity in other windows
setw -g monitor-activity on
set -g visual-activity on
# split panes using | and -
bind-key | split-window -h
bind-key - split-window -v
unbind '"'
unbind %
# reload config file (change file location to your the tmux.conf you want to use)
bind-key r source-file ~/.tmux.conf
# Other nifty bindings
bind-key S command-prompt -p ssh: "new-window -n %1 'ssh %1'"
# switch panes using Meta-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# resize panes with shift-arrow (+meta for 5 lines)
bind -n S-Left resize-pane -L
bind -n S-Right resize-pane -R
bind -n S-Up resize-pane -U
bind -n S-Down resize-pane -D
bind -n M-S-Left resize-pane -L 5
bind -n M-S-Right resize-pane -R 5
bind -n M-S-Up resize-pane -U 5
bind -n M-S-Down resize-pane -D 5
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
# Double LMB Select & Copy (Word)
bind-key -T copy-mode DoubleClick1Pane \
select-pane \; \
send-keys -X select-word \; \
run-shell "sleep .3s" \; \
send-keys -X copy-selection-and-cancel
bind-key -n DoubleClick1Pane \
select-pane \; \
copy-mode -M \; \
send-keys -X select-word \; \
run-shell "sleep .3s" \; \
send-keys -X copy-selection-and-cancel
# Triple LMB Select & Copy (Line)
bind-key -T copy-mode TripleClick1Pane \
select-pane \; \
send-keys -X select-line \; \
run-shell "sleep .3s" \; \
send-keys -X copy-selection-and-cancel
bind-key -n TripleClick1Pane \
select-pane \; \
copy-mode -M \; \
send-keys -X select-line \; \
run-shell "sleep .3s" \; \
send-keys -X copy-selection-and-cancel
# Local system additions (for dotfiles mac vs. linux)
source-file ~/.tmux/local.conf
# Enable automatic restore after reboot
set -g @continuum-restore 'on'
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'seebi/tmux-colors-solarized'
#### COLOUR
set -g @colors-solarized '256' # (the default)
#set -g @colors-solarized 'dark'
#set -g @colors-solarized 'light'
#set -g @colors-solarized 'base16'
# MacOS iterm2 doesn't like this setting so disable it
set-window-option -g aggressive-resize off
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'