-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux.conf
More file actions
141 lines (122 loc) · 5.17 KB
/
tmux.conf
File metadata and controls
141 lines (122 loc) · 5.17 KB
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
# Allen Wild
# .tmux.conf
set -g default-terminal "screen-256color"
set -g prefix C-d
bind C-d send-prefix
set -g base-index 1
set -g pane-base-index 1
setw -g monitor-activity on
setw -g mode-keys vi
set -g history-limit 90001
set -g repeat-time 150
setw -g aggressive-resize on
set -g escape-time 10
set -g status-interval 2
set -g status-right '#(whoami)@#H'
set -g renumber-windows on
setw -g allow-rename on
# set default shell to zsh, if available
run-shell '_zsh="$(which zsh 2>/dev/null)" ; test -x "$_zsh" && tmux set -g default-shell "$_zsh" || true'
# don't link tmux buffer and xterm/X11 clipboard
set -g set-clipboard off
# Set the outer terminal title
set -g set-titles on
set -g set-titles-string "tmux #{host_short}"
# Mouse support.Bindings are slightly tweaked from the defaults to send 'up' keystrokes in
# alternate pane mode, which makes scrolling in 'less' work properly.
set -g mouse on
bind -n WheelUpPane \
if -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" {
send -M
} {
if -F "#{alternate_on}" {
select-pane
send -N 3 up
} {
copy-mode -e
send -M
}
}
bind -n WheelDownPane \
if -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" {
send -M
} {
if -F "#{alternate_on}" {
select-pane
send -N 3 down
}
}
# Try to prevent setting a non-blinking cursor when using Windows Terminal by overriding the
# cnorm (make cursor appear normal) terminfo behavior for xterm parent terminals to instead
# send the same escape sequence as cvvis (make cursor very visible, i.e. blink).
#
# In the terminfo for xterm, cnorm is DECRST 12 (stop blinking) + DECSET 25 (enable cursor).
# Mintty just ignores DECRST 12 when blinking cursor is enabled, but Windows Terminal doesn't.
# This is annoying because vim and some other applications will send a cnorm and the cursor
# stops blinking and never starts again.
#
# Work around this in tmux by trranslating cnorm in xterm to be the same as cvvis, i.e.
# DECSET 12 (start blinking) plus DECSET 25 (enable cursor).
#
# See https://github.com/microsoft/terminal/issues/1379 and a bunch of related issues.
set -g terminal-overrides 'xterm*:cnorm=\033[?12;25h'
# TMUX 2.0+ Window Splits
bind v split-window -h -c '#{pane_current_path}'
bind s split-window -c '#{pane_current_path}'
bind w new-window -c '#{pane_current_path}'
bind r source-file ~/.tmux.conf \; display-message "Config Reloaded"
bind \; command-prompt
bind X confirm-before -p "kill-window #W (y/n)" kill-window
bind , command-prompt -I "rename-window "
unbind Up
unbind Down
unbind Left
unbind Right
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind L last-window
bind n next-window
bind N previous-window
bind m previous-window
bind M select-pane -m
bind p last-pane
bind c choose-window
bind -n C-PageUp previous-window
bind -n C-PageDown next-window
bind . select-layout "485a,237x53,0,0{118x53,0,0,21,118x53,119,0[118x26,119,0,22,118x26,119,27,23]}"
bind F command-prompt "find-window '%%'"
bind f run -b "tmux show-buffer | xsel -i -b"
bind + choose-buffer
bind T new-window htop
bind = resize-pane -Z
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-selection-and-cancel
bind -T copy-mode-vi Space send -X clear-selection
bind -T copy-mode-vi Escape send -X cancel
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel
# BEGIN :TmuxlineSnapshot
# This tmux statusbar config was created by tmuxline.vim
# on Thu, 04 Jan 2018
# 2019-04-25: update for tmux 2.9, change -(fg|bg|attr) options
# to -style, and clean up the status formats a bit.
set -g status-justify "left"
set -g status "on"
set -g status-style none,bg="colour235"
set -g message-command-style fg="colour187",bg="colour234"
set -g status-left-length 100
set -g pane-active-border-style fg="colour64"
set -g pane-border-style fg="colour234"
set -g message-style fg="colour187",bg="colour234"
set -g status-left-style none
set -g status-right-style none
set -g status-right-length 100
setw -g window-status-style none,fg="colour187",bg="colour235"
setw -g window-status-activity-style none,fg="colour142",bg="colour235"
setw -g window-status-separator ""
set -g status-left "#[fg=colour235,bg=colour64,bold] S#S #[fg=colour64,bg=colour234,none]#[fg=colour187,bg=colour234] W#I #[fg=colour234,bg=colour235,none]#[fg=colour187,bg=colour235] P#P #[fg=colour235,bg=colour235,none]"
set -g status-right "#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour234,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour187,bg=colour234] %l:%M %P #[fg=colour64,bg=colour234,none]#[fg=colour235,bg=colour64] #(whoami)@#H "
setw -g window-status-format "#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[default] #I #{?window_zoomed_flag,[Z],}#W #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]"
setw -g window-status-current-format "#[fg=colour235,bg=colour237,nobold,nounderscore,noitalics]#[fg=colour187,bg=colour237] #I #{?window_zoomed_flag,[Z],}#W #[fg=colour237,bg=colour235,nobold,nounderscore,noitalics]"
if-shell 'test -r ~/.tmux_local.conf' { source-file ~/.tmux_local.conf }