-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtmux.conf
116 lines (93 loc) · 3.68 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
# ~/.tmux.conf - tmux(1)
# Min version: trying to stay compatible with 2.3 (stretch)
set -g prefix C-a
bind-key 0 select-window -t :=10
bind-key a send-prefix
bind-key C-a last-window
bind-key | split-window -h
bind-key '\' split-window -h
bind-key - split-window -v
# Auto-disable renaming after a custom name is set (assumes that the pane won't
# travel outside its current window, as the setting is session- and pane-level
# but not window-level).
bind-key , command-prompt -I "#W" { rename-window "%%"; set -p allow-rename off }
# Swap current window with adjacent
bind-key C-p swap-window -d -s -0 -t -1
bind-key C-n swap-window -d -s +0 -t +1
# Swap current window with marked
bind-key C-m swap-window -d
# Renumber windows (fill gaps)
bind-key C-r move-window -r\; display-message "windows renumbered"
# Picocom BREAK key
bind-key 'C-\' send-prefix\; send-keys 'C-\'
# Fun
bind-key C-h display-popup -E -h 66% htop
# Very detach
bind-key C-d detach-client -P
# Update working directory
bind-key C new-window -c "#{pane_current_path}"
bind-key M-c attach-session -c "#{pane_current_path}"\; display-message "new cwd: #{pane_current_path}"
# Reload tmuxrc
bind-key M-r source-file ~/.config/tmux/tmux.conf\; display-message "tmux.conf reloaded"
set -g default-terminal "tmux-256color"
# Avoid <prefix> staying sticky after window switching
set -g repeat-time 0
# Make standalone <Esc> be recognized faster
set -g escape-time 50
# Prevent appends from accumulating on reloads
set -g terminal-overrides ""
# Fix annoying bell-on-attach on PuTTY
set -ga terminal-overrides ",xterm*:Cr="
# Activate RGB-color support (2.2+)
# (this automatically adds setrgbf= and setgrbb= in 2.6)
# (this may become redundant in 2.7, due to ncurses 6.1 having "RGB" cap in
# xterm-direct etc.)
set -ga terminal-overrides ",putty-256color:Tc"
set -ga terminal-overrides ",tmux-256color:Tc"
set -ga terminal-overrides ",xterm-256color:Tc"
# Include modifier keys in funcseqs
# (enabled by default in 2.4+)
set -g xterm-keys on
# Enable tmux-wide mouse support (resizing, tab switching)
set -g mouse on
# Request focus in/out events
set -g focus-events on
# Enable changing the outer terminal's title
set -g set-titles on
set -g set-titles-string "#T (#h.#S.#I)"
# Allow shell to change window names via \ek..\e\\
if-shell -F \
'#{m:ember,#h}' \
'set -g allow-rename on'
# Make windows start at 1 instead of 0
set -g base-index 1
# Clamp windows to the smallest attached client
# (tmux 3.1 switched default to 'latest' which uses the size of the client
# with most recent input activity)
set -g window-size smallest
# When a session gets destroyed, switch to another instead of exiting
set -g detach-on-destroy off
# Don't update any environment variables on attach (Kerberos, SSH, etc.)
set -g update-environment ""
# Never remember non-default (e.g. delegated) Kerberos cache, or other SSH
# connection-specific values
setenv -g -u "KRB5CCNAME"
setenv -g -u "SSH_TTY"
# Status bar -- global appearance
set -g status-style "fg=colour250,bg=colour233"
set -g status-left "#{?client_prefix,#[fg=colour180]=#[fg=default], }#S "
set -g status-right "#[dim]%b %d, %H:%M "
# Status bar -- window "tabs"
fmt="#{?window_marked_flag,<, }#[bold]#I#[nobold] #W#{?window_marked_flag,>, }"
set -g window-status-format "$fmt"
set -g window-status-current-format "#{?client_prefix,#[fg=colour233]#[bg=colour180],}$fmt"
set -g window-status-current-style "fg=colour233,bg=colour166"
set -g window-status-activity-style "fg=colour233,bg=colour166"
setenv -g -u fmt
# Pane separator
set -g pane-border-style "fg=white"
set -g pane-active-border-style "fg=yellow"
# Show titlebars for split panes
set -g pane-border-status top
# next release?
#set -g pane-scrollbars on