-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
86 lines (65 loc) · 2.03 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
# Scrollback
set -g history-limit 50000
# Statusbar
set -g status-justify left
set -g status-right ''
# 256 color
set -g default-terminal 'tmux-256color'
# xterm style keys
setw -g xterm-keys on
# Use Ctrl-a
unbind C-b
set -g prefix C-a
bind-key a send-prefix
# use ctrl+a ctrl+c for new window too
bind C-c new-window
bind-key -n C-t new-window
# navigate panes with hjkl
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# bind vi key-mapping
set -g status-keys vi
# vi-style controls for copy mode
set-window-option -g mode-keys vi
# vi copy mode keys
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel 'pbcopy'
bind-key -Tcopy-mode-vi Escape send -X cancel
bind-key -Tcopy-mode-vi V send -X rectangle-toggle
# Titles
set -g set-titles on
set -g set-titles-string '#W'
# Reload config
unbind r
bind-key r source-file ~/.tmux.conf \; display-message 'Config reloaded...'
# Ctrl-Left/Right cycles thru windows (no prefix)
bind-key -n C-Left select-window -t :-
bind-key -n C-Right select-window -t :+
# Ctrl-Up/Down cyles thru panes (no prefix)
bind-key -n C-Up select-pane -t :.-
bind-key -n C-Down select-pane -t :.+
# Move window left-right
bind-key -n C-S-Left swap-window -d -t -1
bind-key -n C-S-Right swap-window -d -t +1
# Disable activity monitor
setw -g monitor-activity off
set -g visual-activity off
# Window status format
set -g window-status-format '#W'
# Clear screen
bind-key l send-keys 'clear' \; send-keys 'Enter'
# Clear history
bind-key -n C-k clear-history
# Others
set -s escape-time 0
setw -g automatic-rename on
setw -g aggressive-resize on
set -g renumber-windows on
bind -n S-Pageup copy-mode -u
bind-key X confirm-before -p 'Kill #S (y/n)?' "run-shell 'tmux switch-client -n \\\; kill-session -t \"\$(tmux display-message -p \"#S\")\"'"
set -g pane-active-border-style fg=brightred
# 24bit colors
set-option -ga terminal-overrides ',tmux-256color:Tc'
if '[ -f $HOME/.tmux.conf.$HOSTNAME ]' 'source-file $HOME/.tmux.conf.$HOSTNAME'