-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtmux.conf
125 lines (98 loc) · 4.03 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
# Change prefix key to Ctrl+z
unbind C-b
set -g prefix C-z
bind-key C-z send-prefix
set -g base-index 1
set-window-option -g automatic-rename on
# change if in nested machine
# if-shell '[[ "screen-256color" = "$TERM" ]]' 'bind-key C-a send-prefix'
# if-shell '[[ "screen-256color" = "$TERM" ]]' 'set-option prefix C-a'
# if-shell 'true' 'bind-key C-a send-prefix'
# if-shell 'true' 'set-option -g prefix C-a'
set -g default-terminal 'tmux-256color'
set -g terminal-features 'xterm*:extkeys'
set-option -as terminal-overrides ',tmux*:Ms=\E]52;%p1%s;%p2%s\007'
# set -as terminal-overrides ',xterm*:Tc:sitm=\E[3m'
set-option -sa terminal-overrides ',iterm2:RGB'
set-option -sa terminal-overrides ',iterm2:Tc'
set-option -as terminal-overrides ',iterm2:Ms=\E]52;%p1%s;%p2%s\007'
set set-clipboard on
# setenv -g TERM xterm-256color
# More straight forward key bindings for splitting
unbind %
unbind '"'
unbind h
unbind j
unbind k
unbind l
run-shell ~/.dotfiles/tmux/tmux-pain-control/pain_control.tmux
run-shell ~/.dotfiles/tmux/tmux-sensible/sensible.tmux
bind -n C-M-t new-window
bind -n C-M-[ previous-window
bind -n C-M-] next-window
bind -n C-M-w kill-pane
set -s user-keys[0] "\e[116;7u"
bind -n User0 new-window
set -s user-keys[1] "\e[91;7u"
bind -n User1 previous-window
set -s user-keys[2] "\e[93;7u"
bind -n User2 next-window
set -s user-keys[3] "\e[119;7u"
bind -n User3 kill-pane
bind -n C-M-Left select-pane -L
bind -n C-M-Down select-pane -D
bind -n C-M-Up select-pane -U
bind -n C-M-Right select-pane -R
set -s user-keys[4] "\e[1;7A"
bind -n User4 select-pane -L
set -s user-keys[5] "\e[1;7B"
bind -n User5 select-pane -D
set -s user-keys[6] "\e[1;7C"
bind -n User6 select-pane -U
set -s user-keys[7] "\e[1;7D"
bind -n User7 select-pane -R
bind -n C-M-H select-pane -L
bind -n C-M-J select-pane -D
bind -n C-M-K select-pane -U
bind -n C-M-L select-pane -R
set -s user-keys[8] "\e[104;7u"
bind -n User8 select-pane -L
set -s user-keys[9] "\e[106;7u"
bind -n User9 select-pane -D
set -s user-keys[10] "\e[107;7u"
bind -n User10 select-pane -U
set -s user-keys[11] "\e[108;7u"
bind -n User11 select-pane -R
bind -n M-S-Left resize-pane -L 5
bind -n M-S-Down resize-pane -D 5
bind -n M-S-Up resize-pane -U 5
bind -n M-S-Right resize-pane -R 5
bind r source-file ~/.tmux.conf
# Use Vi mode
setw -g mode-keys vi
set-option -g xterm-keys on
set-option -g mouse on
# yeah, it's a lie, but it makes mappings easier in vim
# set -g default-terminal "xterm-256color"
# set -g default-terminal "screen-256color"
# Notifying if other windows has activities
setw -g monitor-activity on
set -g visual-activity on
bind-key S command-prompt "new-window -n %1 'ssh -t %%'"
new-session -s default
set-option set-titles on
set -g status-left-length 52
set -g status-right-length 451
set -g status-fg white
set -g status-bg colour234
# if-shell '[[ "typhoon" == "$HOST" ]]' 'set -g status-left "#[fg=colour235,bg=colour252,bold] # #S #[fg=colour252,bg=colour238,nobold]>#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]>"' 'set -g status-left "#[fg=colour235,bg=colour252,bold] # #S #[fg=colour252,bg=colour238,nobold]>#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]>"'
# if-shell '[[ "typhoon" == "$HOST" ]]' 'set -g window-status-current-format "#[fg=colour234,bg=colour39]>#[fg=colour25,bg=colour39,noreverse,bold] #I > #W #[fg=colour39,bg=colour234,nobold]>"' 'set -g window-status-current-format "#[fg=colour234,bg=colour39]▶#[fg=colour25,bg=colour39,noreverse,bold] #I > #W #[fg=colour39,bg=colour234,nobold]>"'
set -g window-status-format "#[fg=white,bg=colour234] #I #W "
if-shell "test -f ~/.vim/tmuxline_tmux.conf" "source ~/.vim/tmuxline_tmux.conf"
# Tmux plugin manager
set -g @plugin 'tmux-plugins/tpm'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.cache/antidote/https-COLON--SLASH--SLASH-github.com-SLASH-tmux-plugins-SLASH-tpm/tpm'
# Fixes iterm2 integration. Should go after "run '~/.tmux/plugins/tpm/tpm'"
setw -g aggressive-resize off
set-option -g allow-passthrough on