-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdot_tmux.conf
124 lines (106 loc) · 3.31 KB
/
dot_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
117
118
119
120
121
122
123
124
# Esc without delay
set-option -s escape-time 30
setw -g mode-keys vi
# Vim-style copy/paste
unbind p
bind p paste-buffer
bind -T copy-mode-vi H send -X start-of-line
bind -T copy-mode-vi L send -X end-of-line
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi Escape send -X cancel
set -g history-limit 10000
set-option -g default-shell $SHELL
set-option -g default-command "${SHELL}"
# new feature in tmux 2.1 with new ncurses
#set -g default-terminal "tmux-256color"
set -g default-terminal "screen-256color" # + "tmux -2" => 256 color
# true color support
set -ga terminal-overrides ",xterm-256color:Tc,screen-256color:Tc,tmux-256color:Tc"
# Make it use C-a, similar to screen..
unbind C-b
unbind l
set -g prefix C-a
bind a send-prefix
bind C-a last-window
bind l next-window
bind h previous-window
bind j command-prompt -p "join pane from:" "join-pane -s '%%'"
bind b break-pane
bind -n C-M-h swap-window -d -t -1
bind -n C-M-l swap-window -d -t +1
# Use Alt-arrow keys without prefix key to switch panes
bind -n M-o new-window
bind -n M-i split-window -h -c '#{pane_current_path}'
bind -n M-e split-window -c '#{pane_current_path}'
# Use Alt-arrow keys without prefix key to switch panes
bind -n M-h previous-window
bind -n M-l next-window
# switch windows alt+number
bind -n M-1 select-window -t 1
bind -n M-2 select-window -t 2
bind -n M-3 select-window -t 3
bind -n M-4 select-window -t 4
bind -n M-5 select-window -t 5
bind -n M-6 select-window -t 6
bind -n M-7 select-window -t 7
bind -n M-8 select-window -t 8
bind -n M-9 select-window -t 9
# Use Alt-vim keys without prefix key to switch panes
bind -n M-a select-pane -L
bind -n M-s select-pane -D
bind -n M-w select-pane -U
bind -n M-d select-pane -R
# scroll
bind -n M-Pageup copy-mode -eu
# Reload key
bind r source-file ~/.tmux.conf \; display 'Reloaded tmux config.'
bind k confirm-before -p "kill-pane #W? (y/n)" kill-pane
bind K confirm-before -p "kill-session #S? (y/n)" kill-session
# Start numbering at 1
set -g base-index 1
set -g renumber-windows on
# Title
set -g set-titles on
set -g set-titles-string '#S - #W'
# window number,program name, active(or not)
# disable sound bell
set -g bell-action none
# disable visual bell
set -g visual-bell off
# statusbar
set -g status-interval 1
set -g status-justify left
set -g status-left-length 20
set -g status-left ' #[fg=blue,bold]#(hostname | cut -b -16)#[default] | '
set -g status-right ' | #[fg=yellow,bold]%H:%M:%S #[fg=blue]%a %Y-%m-%d '
# default statusbar colors
set -g status-style bg=colour235,fg=red
# default window title colors
setw -g window-status-style fg=white
# active window title colors
setw -g window-status-current-style fg=magenta
# window activity notify color
setw -g window-status-activity-style fg=green
# Window options
setw -g clock-mode-colour blue
setw -g clock-mode-style 24
setw -g visual-activity off
setw -g monitor-activity on
setw -g xterm-keys on
setw -g automatic-rename on
setw -g aggressive-resize on
# Mouse mode (tmux 2.2+)
set -g mouse on
# Toggle mouse on
bind m \
set -g mouse on \;\
display 'Mouse: ON'
# Toggle mouse off
bind M \
set -g mouse off \;\
display 'Mouse: OFF'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-resurrect'
run '~/.tmux/plugins/tpm/tpm'