-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf
142 lines (117 loc) · 3.12 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
set -g default-terminal screen-256color
set -g default-command bash
setw -g xterm-keys on
# Change prefix key to Ctrl+a
unbind C-b
set -g prefix C-a
# Able to send prefix key
bind a send-prefix
# Set to 1-based, easy to press with starting 1 than 0
setw -g base-index 1
# Last active window
unbind l
bind C-a last-window
# Next window
bind C-s next-window
# Copy mode
unbind [
bind Escape copy-mode
# Use Vi mode
setw -g mode-keys vi
# Leave mouse-mode on, you can use opt-mouseclick to get native OSX select
# Pre-2.1
# set -g mode-mouse on
# set -g mouse-resize-pane on
# set -g mouse-select-pane on
# set -g mouse-select-window on
set-option -g mouse on
bind P paste-buffer
# old
# bind-key -T vi-copy 'v' begin-selection
# bind-key -T vi-copy 'y' copy-selection
# new
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-selection
bind c new-window
# More straight forward key bindings for splitting
unbind %
bind | split-window -h
unbind '"'
bind - split-window -v
# History
set -g history-limit 10000
bind C clear-history
set -g display-panes-time 3000
set -g display-time 3000
# Pane
unbind o
bind C-d select-pane -t :.+
# Pane navigation
unbind Down
unbind Up
unbind Left
unbind Right
bind -r j select-pane -D
bind -r k select-pane -U
bind -r h select-pane -L
bind -r l select-pane -R
# Pane resizing
unbind M-Up
unbind M-Down
unbind M-Left
unbind M-Right
unbind C-Up
unbind C-Down
unbind C-Left
unbind C-Right
bind -r M-k resize-pane -U 5
bind -r M-j resize-pane -D 5
bind -r M-h resize-pane -L 5
bind -r M-l resize-pane -R 5
bind -r K resize-pane -U
bind -r J resize-pane -D
bind -r H resize-pane -L
bind -r L resize-pane -R
set -g pane-border-fg colour240
set -g pane-active-border-fg blue
# Terminal emulator window title
set -g set-titles on
set -g set-titles-string '#S:#I.#P #T'
# Status Bar
set -g status-bg colour0
set -g status-fg colour248
set -g status-interval 1
#set -g status-left ''
#set -g status-right ''
# Notifying if other windows has activities
setw -g monitor-activity on
set -g visual-activity on
# Window modes color
#setw -g mode-bg colour0
#setw -g mode-fg colour255
# Message/command input colors
set -g message-bg colour24
set -g message-fg colour255
# Window status
setw -g window-status-current-format "#I:#T#F"
setw -g window-status-format "#I:#T#F"
# Window status colors
#setw -g window-status-bg colour0
#setw -g window-status-fg colour248
#setw -g window-status-bell-attr underscore
#setw -g window-status-bell-bg colour0
#setw -g window-status-bell-fg colour248
#setw -g window-status-current-attr bright,italics
#setw -g window-status-current-bg colour0
#setw -g window-status-current-fg colour248
#setw -g window-status-activity-attr bright,italics,underscore
#setw -g window-status-activity-bg colour0
#setw -g window-status-activity-fg colour248
# Clock
setw -g clock-mode-colour colour250
setw -g clock-mode-style 24
# Clipboard woes >_<
# Only paste and set tmux's buffer with Primary's content
bind C-p run "tmux set-buffer \"$(xsel -o)\"; tmux paste-buffer"
# Copy to both Primary and Clipboard buffers
bind C-y run "tmux show-buffer | xsel -i ; tmux show-buffer | xsel -i -b"