-
Notifications
You must be signed in to change notification settings - Fork 2
/
tmux.conf
85 lines (61 loc) · 2.75 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
# Use tmux's own terminfo entry instead of emulating screen, and declare support
# for 256 colors.
set -s default-terminal 'tmux-256color'
# hterm supports a number of features from modern XTerm
# (https://chromium.googlesource.com/apps/libapps/+/HEAD/hterm/doc/ControlSequences.md).
set -as terminal-features \
'hterm*:256:RGB:bpaste:clipboard:ccolour:cstyle:focus:mouse:strikethrough:title:usstyle'
# Every XTerm-like terminal we use supports bracketed paste and mouse reporting.
set -as terminal-features 'xterm*:bpaste:mouse'
# Additionally, every 256-color XTerm-like terminal we're likely to see in
# practice also supports true color (https://github.com/termstandard/colors).
set -as terminal-features 'xterm-256color:RGB'
# Reduce duration tmux waits for escape sequences to mitigate delays in Vim.
set -s escape-time 50
# Notify applications like Vim when they gain/lose focus.
set -s focus-events on
# Resize windows according to the smallest session where the window is active,
# not the smallest session overall.
set -g aggressive-resize on
# Increase maximum number of lines in the scrollback buffer.
set -g history-limit 65536
# Use Emacs keybindings in the tmux command prompt.
set -g status-keys emacs
# Replace the default Ctrl-B prefix with the more convenient Ctrl-Space. This
# mirrors our Vim leader, which is just Space.
set -g prefix C-Space
# Remove some default keybindings we replace with better ones.
unbind '"'
unbind %
# Define new keybindings to open new panes/windows. Use the current pane's
# working directory in the new pane/window by default.
bind - split-window -c "#{pane_current_path}"
bind \\ split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Use vi-style keybindings.
set -g mode-keys vi
# Allow scrolling, text selection, and window/pane manipulation by mouse.
set -g mouse on
# Index new windows starting at 1, not 0. Counting should always start at 0,
# of course, but 0 sits on the wrong side of the keyboard. ;)
set -g base-index 1
# Repack all windows when a window is closed, reusing the closed window's index.
set -g renumber-windows on
# Monitor inactive windows for activity.
set -g monitor-activity on
# Set colors. Er, ..., colours. :)
set -g message-style ''
set -g pane-active-border-style 'fg=brightblue'
set -g status-style 'fg=green'
set -g window-status-style 'fg=brightblack,bold'
set -g window-status-current-style 'fg=brightblue'
set -g window-status-bell-style 'fg=magenta,reverse'
# Tweak the status bar a bit.
set -g status-left '#h:#S '
set -g status-left-length 40
set -g status-right ''
set -g window-status-format '{#I-#W}'
set -g window-status-current-format '[#I-#W]'
# Pass window titles through to the outer terminal emulator.
set -g set-titles on
set -g set-titles-string '#T'