-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
executable file
·146 lines (110 loc) · 3.92 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# start numbering at 1
set-option -g base-index 1
# create a default session on server start
new-session
set -g prefix C-s
unbind C-b
bind C-s send-prefix
# Add dim color support
set -sa terminal-overrides ",*:dim=\\E[2m"
# Clear buffer
bind C-l send-keys -R \; clear-history
# support for 256 colors
set-option -g default-terminal "screen-256color"
# make pbcopy & pbpaste to work in OS X
if-shell 'test "$(uname)" = "Darwin"' \
'set-option -g default-command "tmux rename-window shell; reattach-to-user-namespace -l $SHELL"'
# bind vi key-mapping
set-option -g status-keys vi
# vi-style controls for copy mode
set-window-option -g mode-keys vi
# large history
set-option -g history-limit 100000
# highlight status bar on activity
set-window-option -g monitor-activity off
set-option -g visual-activity on
set-option -g visual-bell off
# automatically set window title
set-option -g automatic-rename off
# force a reload of the config file
bind r source-file ~/.tmux.conf
# default statusbar colors
set-option -g status-bg colour234
set-option -g status-fg colour244
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg colour244
set-window-option -g window-status-bg default
set-window-option -g window-status-attr dim
# active window title colors
set-window-option -g window-status-current-fg colour254
set-window-option -g window-status-current-bg default
set-window-option -g window-status-current-attr none
# activity window colors
set-window-option -g window-status-activity-attr default
# pane border
set-option -g pane-border-fg colour235
set-option -g pane-active-border-fg colour240
# message text
set-option -g message-bg colour235
set-option -g message-fg colour7
# pane number display
set-option -g display-panes-active-colour colour4
set-option -g display-panes-colour colour7
# clock
set-window-option -g clock-mode-colour colour214
# splitting windows into panes with h and v
bind-key h split-window -v -c "#{pane_current_path}"
bind-key v split-window -h -c "#{pane_current_path}"
# create new window with the current directory
bind-key c new-window -c "#{pane_current_path}"
# set up resize-pane keys
bind-key -r > resize-pane -R 3
bind-key -r < resize-pane -L 3
bind-key -r - resize-pane -D 1
bind-key -r = resize-pane -U 1
# shift + arrows to switch windows (w/o prefix key)
bind -n S-Left previous-window
bind -n S-Right next-window
# set up swap-pane keys
bind-key [ swap-pane -U
bind-key ] swap-pane -D
# mouse mode
set -g mouse on
# report focus events
set -g focus-events on
# remove time and hostname in status bar
set-option -g status-left '#S '
set-option -g status-right ''
# set up copy and paste keys
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
run-shell "tmux setenv -g TMUX_VERSION $(tmux -V | cut -c 6-)"
if-shell -b '[ "$(echo "$TMUX_VERSION < 2.4" | bc)" = 1 ]' \
"bind-key -t vi-copy v begin-selection; \
bind-key -t vi-copy V select-line; \
bind-key -t vi-copy r rectangle-toggle; \
bind -t vi-copy y copy-selection"
if-shell -b '[ "$(echo "$TMUX_VERSION >= 2.4" | bc)" = 1 ]' \
"bind-key -T copy-mode-vi 'v' send -X begin-selection; \
bind-key -T copy-mode-vi 'V' send -X select-line; \
bind-key -T copy-mode-vi 'r' send -X rectangle-toggle; \
bind-key -T copy-mode-vi 'y' send -X copy-selection"
# choose buffer to paste interactively
bind-key o choose-buffer
# delete the most recently copied buffer of text
bind-key x delete-buffer
# toggle statusbar
bind-key b set status
# disable delay between characters in commands
set-option -s escape-time 0
# load local overrides
if-shell "test -f ~/.tmux.local.conf" "source-file ~/.tmux.local.conf"
set-option -g @resurrect-save 'S'
set-option -g @resurrect-restore 'R'
run-shell "$DOTFILES_PATH/tmux/plugins/resurrect/resurrect.tmux"
run-shell "$DOTFILES_PATH/tmux/plugins/open/open.tmux"
run-shell "$DOTFILES_PATH/tmux/plugins/copycat/copycat.tmux"
run-shell "$DOTFILES_PATH/tmux/plugins/yank/yank.tmux"