/
.tmux.conf
82 lines (74 loc) · 2.24 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
# color pallet
color_bg=colour232
color_inactive=colour234
color_sub=colour236
color_key=colour241
color_text=colour255
# basics
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set -g default-terminal "xterm-256color"
set-option -gw xterm-keys on
set -g mouse on
set -g history-limit 20000
set -sg escape-time 0
set -g base-index 1
# status bar
set -g status on
set -g status-interval 2
set -g status-position top
set -g status-justify "left"
set -g status-left ""
status_right_format="#h [#S]"
set -g status-right "$status_right_format"
set-option -g status-right-length 50
## color
set -g status-style "bg=$color_bg,fg=$color_key"
# basic key binds
bind p \
if-shell -F '#{==:#{pane_index},1}' \
'previous-window; run "tmux select-pane -t $(tmux list-panes | wc -l)"' \
'select-pane -t :.-'
bind n \
if-shell -F '#{==:#{pane_index},#{window_panes}}' \
'next-window; select-pane -t 1' \
'select-pane -t :.+'
bind -n C-Pageup \
if-shell -F '#{==:#{pane_index},1}' \
'previous-window; run "tmux select-pane -t $(tmux list-panes | wc -l)"' \
'select-pane -t :.-'
bind -n C-Pagedown \
if-shell -F '#{==:#{pane_index},#{window_panes}}' \
'next-window; select-pane -t 1' \
'select-pane -t :.+'
# window
bind -n C-t new-window -a -c "#{pane_current_path}"
bind -n C-w kill-pane
setw -g pane-base-index 1
setw -g window-status-style "bg=$color_sub"
setw -g window-status-format " "
setw -g window-status-current-style "bg=$color_key"
setw -g window-status-current-format " "
# pane
bind -n M-\ split-window -h -c "#{pane_current_path}"
bind -n M-- split-window -v -c "#{pane_current_path}"
set -g pane-border-style "fg=$color_key"
set -g pane-active-border-style "fg=$color_text"
# copy mode
bind -T copy-mode u send-keys -X page-up
bind -T copy-mode d send-keys -X page-down
bind -T copy-mode Enter send-keys -X cancel
# off mode
bind -T root F12 \
set prefix None\; \
set key-table off\; \
set status-style "fg=$color_sub"\; \
setw -g window-status-style "bg=$color_inactive"\; \
setw window-status-current-style "bg=$color_sub"\; \
refresh-client -S
bind -T off F12 \
set -u prefix\; \
set -u key-table\; \
set -u status-style\; \
setw -g window-status-style "bg=$color_sub"\; \
setw -u window-status-current-style\; \
refresh-client -S