-
Notifications
You must be signed in to change notification settings - Fork 3
/
tmux.conf
100 lines (77 loc) · 2.41 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
# Use UTF8
#set -g utf8
#set -g status-utf8 on
#setw -g utf8 on
#set-option -g -q mouse on
# Support for 256 colors
set -g default-terminal "screen-256color"
# for putty
set -g terminal-overrides "xterm*:kLFT5=\eOD:kRIT5=\eOC:kUP5=\eOA:kDN5=\eOB:smkx@:rmkx@"
# Increase history limit
set -g history-limit 262144
# Automatically renumber window numbers on closing a pane (tmux >= 1.7)
set -g renumber-windows on
# Start window numbering at 1, (0 is too hard to reach)
set -g base-index 1
# Don't wait for an escape sequence
set -s escape-time 1
# Use vim keybindings in copy mode
setw -g mode-keys vi
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
bind -t vi-copy K page-up
bind -t vi-copy J page-down
# Ctrl-^b to toggle (normally prefix-l)
bind ^b last-window
# Ctrl + left/right cycles thru windows
bind -n C-right next
bind -n C-left prev
# Ctrl-b b to send ^b
bind b send-prefix
# Ctrl-b + hjkl to switch pane
unbind l
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Ctrl-b + arrow keys to resize
unbind Left
unbind Right
unbind Down
unbind Up
bind -r Left resize-pane -L 5
bind -r Right resize-pane -R 5
bind -r Down resize-pane -D 5
bind -r Up resize-pane -U 5
# Ctrl-b + + / - to zoom
unbind +
bind + \
new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \;\
swap-pane -s tmux-zoom.0 \;\
select-window -t tmux-zoom
unbind -
bind - \
last-window \;\
swap-pane -s tmux-zoom.0 \;\
kill-window -t tmux-zoom
# Ctrl-r to reload config
bind r source-file ${HOME}/.tmux.conf \; display-message "source-file reloaded"
# Create window under current path
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Theme
set -g status-fg colour231
set -g status-bg colour234
set -g status-left-length 40
set -g status-left '#[fg=colour16,bg=colour254,bold] TMUX ⧉ #S '
set -g status-right-length 150
set -g status-right " %Y/%m/%d %H:%M #[fg=colour16,bg=colour252,bold] #(whoami)@#h "
set -g window-status-format "#[fg=colour254,bg=colour239] #I | #W "
set -g window-status-current-format "#[fg=colour117,bg=colour31] #I | #[fg=colour231,bold]#W "
set -g window-status-activity-attr bold
set -g pane-border-fg colour238
set -g pane-active-border-fg colour31
set -g message-fg colour231
set -g message-bg colour31
if-shell 'test "$(uname)" = "Darwin"' 'source ~/.tmux-osx.conf'