-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
122 lines (98 loc) · 4.01 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
set -g prefix M-a
set -g default-terminal "screen-256color"
set -sg escape-time 0
set -g base-index 1
set -g pane-base-index 1
setw -g -q utf8 on
setw -g automatic-rename off
set -g history-limit 300000
unbind Tab
bind-key M-a last-window
bind-key r source-file ~/.tmux.conf
bind-key h split-window -e 'SKIP_H=1' -dhl 25% zsh -ilc 'h w'
bind-key M-h new-window -e 'SKIP_H=1' zsh -ilc 'h e'
setw -g mode-keys vi
unbind %
unbind '"'
unbind [
unbind ]
unbind c
bind-key -n M-u copy-mode
bind-key -n M-i paste-buffer
bind-key -n M-I choose-buffer
# scroll up to last command
bind-key -n M-U copy-mode \; send-keys "? _____" Enter n 0 j \; send-keys "?" C-h C-h C-h C-h C-h C-h Enter
# copy output from last command
bind-key -n M-Y copy-mode \; send-keys "? _____" Enter n 0 jjvGkkhhy
bind-key -n M-O copy-mode \; send-keys "?[" Enter
bind-key -n F11 set-option status
# Panes
bind-key -T copy-mode-vi M-h select-pane -L
bind-key -T copy-mode-vi M-j select-pane -D
bind-key -T copy-mode-vi M-k select-pane -U
bind-key -T copy-mode-vi M-l select-pane -R
bind-key -T copy-mode-vi M-m resize-pane -Z
bind-key -T copy-mode-vi M-M run-shell "~/bin/tmux_switch_zoomed"
bind-key -T copy-mode-vi M-o run-shell "~/bin/tmux_toggle_test_pane"
bind-key -T root M-h select-pane -L
bind-key -T root M-j select-pane -D
bind-key -T root M-k select-pane -U
bind-key -T root M-l select-pane -R
bind-key -T root M-m resize-pane -Z
bind-key -T root M-M run-shell "~/bin/tmux_switch_zoomed"
bind-key -T root M-o run-shell "~/bin/tmux_toggle_test_pane"
bind < resize-pane -L 5
bind > resize-pane -R 5
bind - resize-pane -D 5
bind + resize-pane -U 5
# Windows
bind-key -T copy-mode-vi M-s split-window -v -c "#{pane_current_path}"
bind-key -T copy-mode-vi M-v split-window -h -c "#{pane_current_path}"
bind-key -T copy-mode-vi M-t new-window -c "#{pane_current_path}"
bind-key -T root M-s split-window -v -c "#{pane_current_path}"
bind-key -T root M-v split-window -h -c "#{pane_current_path}"
bind-key -T root M-t new-window -c "#{pane_current_path}"
bind-key -T root M-r new-window "lynx $(hostname)"
bind-key -T copy-mode-vi M-g split-window -hb -l 199 -c "#{pane_current_path}" vimt
bind-key -T root M-g split-window -hb -l 199 -c "#{pane_current_path}" vimt
bind-key -T copy-mode-vi M-p previous-window
bind-key -T copy-mode-vi M-n next-window
bind-key -T root M-p previous-window
bind-key -T root M-n next-window
bind-key -n M-1 select-window -t :1
bind-key -n M-2 select-window -t :2
bind-key -n M-3 select-window -t :3
bind-key -n M-4 select-window -t :4
bind-key -n M-5 select-window -t :5
bind-key -n M-6 select-window -t :6
bind-key -n M-7 select-window -t :7
bind-key -n M-8 select-window -t :8
bind-key -n M-9 select-window -t :9
# New syntax in v2.4
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-selection
bind-key -T copy-mode-vi V send -X rectangle-toggle
setw -g mouse on
set -g status-right "#H %Y%m%d#[fg=colour235]T#[fg=colour136]%H%M#[fg=colour235]%SZ%z"
# for recording
#set -g status-right "#H %Y%m%d#[fg=colour235]%z"
#set -g status-right "#($HOME/bin/p combined) https://#(cat /etc/hostname)"
set -g status-right "#($HOME/bin/p combined) :#(cat /etc/hostname | cut -d. -f 1)"
#### COLOUR
# default statusbar colors
set-option -g status-style default,bg=colour235,fg=colour3
# default window title colors
set-window-option -g window-status-style fg=colour244,bg=default
# active window title colors
set-window-option -g window-status-current-style bg=default,fg=colour3
# pane border
set-option -g pane-border-style fg=colour235 #base02
set-option -g pane-active-border-style fg=colour240 #base01
# message text
set-option -g message-style bg=colour235,fg=colour166 #base02,#orange
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# clock
set-window-option -g clock-mode-colour colour12
# vim:ft=tmux