-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf
82 lines (69 loc) · 3.62 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
# Enable titles and configure them
set-option -g set-titles on
set-option -g set-titles-string "#T"
# TODO: This probably can be done without hooks
set-hook -g after-new-window 'if "[ #{session_windows} -gt 1 ]" "set-option -g set-titles-string \"[#I] #T\" "'
set-hook -g pane-exited 'if "[ #{session_windows} -lt 2 ]" "set-option -g set-titles-string \"#T\" "'
# Allow xterm scrollback
set-option -ag terminal-overrides "xterm*:smcup@:rmcup@"
# Set the status options
# TODO: There are more than these two modes, but at least this makes it easy to see when the prefix has been pressed
set-option -g status-left "#{?client_prefix,#[bg=red] CNTROL ,#[bg=colour242,fg=colour250] INSERT }#[bg=colour237,fg=colour250] #h #[fg=default,bg=default]⡇"
set-option -g status-left-length 100
set-option -g status-right "#{?window_zoomed_flag,#[bg=colour242] ZOOMED ,}"
set-option -g status-bg colour250
set-option -g status-interval 60
set-option -g message-style bg=colour242,fg=black
# Set the window styles in the status
set-window-option -g window-status-format " #W "
set-window-option -g window-status-current-format " #W "
set-window-option -g window-status-current-style bg=colour32,fg=white,bold
set-window-option -g window-status-separator "⡇"
# Make sure we aren't monitoring activity
set-window-option -g monitor-activity off
# Switch to manual renaming so our shell configures it
set-option -g automatic-rename off
set-option -g allow-rename on
# Set the default terminal string to 256-color screen including background erase
set-option -g default-terminal "screen-256color-bce"
# Agressive resize
set-window-option -g aggressive-resize on
# Increase the scrollback buffer size
set-option -g history-limit 10000
# Set custom options
set-option -g @launch "#(date +%s)"
# Key bindings
# M = option with Terminal.app set to 'Use option as meta key', this prevents stomping most application's shortcuts
bind-key -n -r M-p previous-window
bind-key -n -r M-n next-window
bind-key -n -r M-s new-window
bind-key -n -r M-o "select-pane -t :.+"
# Blit the entire pane output to /tmp, useful for really cheaply showing output to someone or logging
bind-key C-p pipe-pane -o 'cat >> /tmp/pane.$USER.#W.#I'
# Complete disable escape-as-meta, because it's just annoying
set-option -g escape-time 0
# Renumber windows when they exit so they behave like normal "tabs"
set-option -g renumber-windows on
# Configure menu to make finding options a little easier sometimes
bind-key -n M-q display-menu -x W -y S \
"New Window" s new-window \
"New Popup" P "popup -E" \
"Kill Window" k "killw" \
"Kill Other Session(s)" X "kill-session -a" \
"" \
"Choose Window" w choose-window \
"Previous Window" p previous-window \
"Next Window" n next-window \
"Swap Window Right" ↑ "swap-window -t -1" \
"Swap Window Left" ↓ "swap-window -t +1" \
"Horizontal Split" h "split-window -h" \
"Vertical Split" v "split-window -v" \
"" \
"Layout Horizontal" h "select-layout even-horizontal" \
"Layout Vertical" k "select-layout even-horizontal" \
"" \
"Swap Pane Up" < "swap-pane -U" \
"Swap Pane Down" > "swap-pane -D" \
"Break Pane" t break-pane \
"Join Pane" j "choose-window 'join-pane -h -s \"%%\"'" \
"#{?window_zoomed_flag,Unzoom,Zoom}" z "resize-pane -Z"