-
Notifications
You must be signed in to change notification settings - Fork 4
/
.tmux.conf
72 lines (59 loc) · 2.72 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
# ---- set-option --------------------------------------------------------------
set-option -g default-terminal "xterm-256color"
set-option -g display-panes-active-colour blue
set-option -g display-panes-colour brightred
set-option -g display-time 4000 # [ms]
set-option -g history-limit 65536
set-option -g message-style fg=brightred,bg=default
set-option -g pane-active-border-style fg=red
set-option -g pane-border-style fg=brightcyan
set-option -g status-interval 1
set-option -g status-justify "centre"
set-option -g status-left-length 50
set-option -g status-left 'session = #S'
set-option -g status-position bottom
set-option -g status-right-length 50
set-option -g status-right "%Y/%m/%d %T"
set-option -g status-style fg=default,bg=default
set-option -s escape-time 0
# ---- set-window-option -------------------------------------------------------
set-window-option -g automatic-rename on
set-window-option -g clock-mode-colour green
set-window-option -g mode-keys vi
set-window-option -g window-status-current-format "#[fg=bold] window[#I][#P] = #W "
set-window-option -g window-status-format " window[#I][#P] = #W "
set-window-option -g window-status-current-style fg=red,bg=default,bright
set-window-option -g window-status-style fg=brightblue,bg=default # dark
# set-window-option -g window-status-style fg=brightyellow,bg=default # light
# ---- bind-key ----------------------------------------------------------------
unbind-key C-b
set-option -g prefix C-x
bind-key C-x send-prefix
bind-key \\ split-window -h
bind-key | split-window -h \; select-layout even-horizontal
bind-key - split-window -v
bind-key _ split-window -v \; select-layout even-vertical
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind-key -r H resize-pane -L 2
bind-key -r J resize-pane -D 2
bind-key -r K resize-pane -U 2
bind-key -r L resize-pane -R 2
bind-key -r h previous-window
bind-key -r l next-window
bind-key -r n new-window #-n 'unnamed'
bind-key -r r source-file ~/.tmux.conf
bind-key -r x kill-window
bind-key -T copy-mode-vi C-h select-pane -L
bind-key -T copy-mode-vi C-j select-pane -D
bind-key -T copy-mode-vi C-k select-pane -U
bind-key -T copy-mode-vi C-l select-pane -R
bind-key -T copy-mode-vi C-v send -X rectangle-toggle
bind-key -T copy-mode-vi V send -X select-line
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-selection
bind-key Space copy-mode
bind-key p paste-buffer