-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
124 lines (89 loc) · 3.84 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
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
set -g prefix `
bind ` send-prefix
set -g default-terminal xterm-256color
### OPTIONS
setw -g xterm-keys on
set -sg escape-time 0
set -g base-index 1
setw -g mode-keys vi
set -g status-keys emacs # for the cmd mode
set -g history-limit 65536
setw -g aggressive-resize
setw -g monitor-activity on # notify on status change
setw -g visual-activity off # but not in the message buffer
### BINDS
bind r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
bind S command-prompt -p "join pane from:" "join-pane -v -s '%%'"
bind V command-prompt -p "join pane from:" "join-pane -h -s '%%'"
bind o break-pane # select this pane in a new window
bind ! break-pane -d # send this pane to a new window
bind O command-prompt -p "send pane to:" "join-pane -t '%%'"
bind = swap-pane # mark the first with prefix m, go to the second and swap
bind + swap-window # mark the first with prefix m, go to the second and swap
bind c new-window -c '#{pane_current_path}'
bind C new-window
# sane mouse scroll
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"
# vim keys
bind k select-pane -U
bind j select-pane -D
bind h select-pane -L
bind l select-pane -R
bind -r J previous-window
bind -r K next-window
bind s split-window -v -c '#{pane_current_path}'
bind v split-window -h -c '#{pane_current_path}'
bind -T copy-mode v send-keys -X begin-selection
bind -T copy-mode y send-keys -X copy-selection
bind -T choice-mode h send-keys -X tree-collapse
bind -T choice-mode l send-keys -X tree-expand
bind -T copy-mode [ send-keys -X halfpage-up
bind -T copy-mode ] send-keys -X halfpage-down
# start copy-mode when trying to scoll
# bind-key -n PPage copy-mode \; send-keys -X page-up
# bind-key -n NPage copy-mode \; send-keys -X page-down
bind -r Tab next-window
bind i move-window -r # reattribute indexes
bind I setw synchronize-panes # toggle input-split
bind C-l clear-history
bind C-S-l refresh-client \; setw synchronize-panes on \; send-keys "C-l" \; setw synchronize-panes off
bind \; last-window
bind space last-pane
bind w choose-window
bind W choose-tree
bind -r M-1 select-layout even-horizontal
bind -r M-2 select-layout even-vertical
bind -r M-3 select-layout main-horizontal
bind -r M-4 select-layout main-vertical
bind -r M-5 select-layout tiled
bind -r M-p previous-layout
bind -r M-n next-layout
bind R respawn-pane -k $SHELL
### VISUAL OPTIONS
## window split
set -g pane-border-style fg=colour238
set -g pane-border-style bg=colour235
set -g pane-active-border-style fg=colour51
set -g pane-active-border-style bg=colour236
## windows select mode
setw -g mode-style bg=colour6
setw -g mode-style fg=colour0
## corner status bars
# `:prefix pressed, v/>: visual or normal, +:zoomed, !:multiple sessions, R:readonly, I:split input
set -g status-left '#[fg=colour202]#{?client_prefix,`, }#{?pane_in_mode,v,>}#{?window_zoomed_flag,+, }#{?session_many_attached,!, }#{?client_readonly,R, }#{?pane_synchronized,I, } #[bg=colour233]'
set -g status-right '@#h #[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
set -g status-bg colour233
set -g status-fg colour250
## bottom bar
setw -g window-active-style none
setw -g window-status-activity-style none
setw -g window-status-bell-style none
setw -g window-status-current-style none
setw -g window-status-last-style none
setw -g window-status-style none
setw -g window-status-format "#[fg=colour196]#[bg=colour31]#{?window_bell_flag,#[bg=colour226]/#I\\, #I }#[fg=colour6]#[bg=colour234] #W#{?window_last_flag,-, }#{?window_activity_flag,!,}#{?window_silence_flag,~,} "
setw -g window-status-current-format "#[fg=colour196,bg=colour31] #I #[fg=colour6,bg=colour235] #W* "
set -g bell-action none
setw -g window-status-separator " "
setw -g message-style fg=colour248
setw -g message-style bg=colour233