-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
125 lines (98 loc) · 4.76 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
124
125
# Options {{{
set -ga terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
set -ga terminal-overrides ",xterm-256color:Tc"
set -ga terminal-overrides ",screen-256color:Tc"
set -ga terminal-overrides ",xterm-termite:Tc"
set -ga terminal-features ",xterm-256color:usstyle"
set -g base-index 1
setw -g pane-base-index 1
setw -g monitor-activity on
set -g visual-activity off
set -g renumber-windows on
set -g activity-action none
set -g bell-action other
set -g allow-passthrough on
# Note: this is overrided in Nested Session Control to be on for proper copy
# support in nested sessions. However "set-clipboard" is a server option, so it
# applies to all the sessions, meaning that there is a corner case that if you
# use two sessions simultaneously you may get broken copy behaviour.
set -g set-clipboard external
set -g @thumbs-reverse enabled
set -g @thumbs-unique enabled
set -g @thumbs-osc52 enabled
set -g @thumbs-command 'tmux set-buffer -w "{}"'
set -g @thumbs-upcase-command 'tmux set-buffer -w "{}" && tmux paste-buffer'
# }}}
# Keybinding {{{
setw -g mode-keys vi
set -g prefix ^a
set -g prefix2 IC
# tmux-pain-control is still painful.
bind -n S-up new-window
bind -n S-left prev
bind -n S-right next
set -g @jump-key 'v'
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
# }}}
# Nested Session Control {{{
bind -n F7 set status-position
bind -T root S-down \
set prefix None \;\
set key-table off \;\
set set-clipboard on\;\
set window-status-current-style bg=colour99 \;\
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
refresh-client -S \;\
bind -T off S-down \
set -u prefix \;\
set -u key-table \;\
set set-clipboard external\;\
set window-status-current-style bg=colour31 \;\
refresh-client -S
# }}}
# Theme {{{
if-shell "which powerline-daemon" \
'run-shell "powerline-daemon -q"; run-shell "powerline-config tmux setup"' \
"set -g status-interval 10; \
set -g status-style fg=colour248,bg=colour233; \
set -g status-left-length 16; \
set -g status-left '#{?client_prefix,#[fg=colour254]#[bg=colour31]#[bold]#[noitalics]#[nounderscore],#[fg=colour16]#[bg=colour254]#[bold]#[noitalics]#[nounderscore]} #S '; \
set -g status-right-length 60; \
set -g status-right \"#[fg=green,bg=colour233] #(cut -d' ' -f-3 < /proc/loadavg) #[fg=colour252,bg=colour233]%Y-%m-%d #[fg=colour252,bold]%R #[fg=colour232,bg=colour254,bold] #H \";"
set -g window-status-format '#[fg=colour244,bg=colour233,nobold,noitalics,nounderscore] #I#{?window_flags,#F, } #{?window_activity_flag,#[fg=colour11]#[bg=colour233],#[fg=colour248]#[bg=colour233]#[nobold]#[noitalics]#[nounderscore]}#W '
set -g window-status-current-format ' #[fg=colour117,nobold,noitalics,nounderscore]#I#F #[fg=colour231,bold,noitalics,nounderscore]#W '
set -g window-status-current-style bg=colour31
set -g window-status-activity-style fg=colour11,bg=colour233,none
set -g window-status-separator ''
# set -g status-justify centre
# }}}
# Plugins (tpm) {{{
set -g @plugin 'Riatre/tpm#de7728b7d59d327f8f10fe44c9276dc22d95afdf'
set -g @plugin 'tmux-plugins/tmux-sensible#25cb91f42d020f675bb0a2ce3fbd3a5d96119efa'
set -g @plugin 'tmux-plugins/tmux-pain-control#32b760f6652f2305dfef0acd444afc311cf5c077'
set -g @plugin 'tmux-plugins/tmux-sessionist#a315c423328d9bdf5cf796435ce7075fa5e1bffb'
set -g @plugin 'tmux-plugins/tmux-sidebar#a41d72c019093fd6a1216b044e111dd300684f1a'
set -g @plugin 'tmux-plugins/tmux-copycat#d7f7e6c1de0bc0d6915f4beea5be6a8a42045c09'
set -g @plugin 'tmux-plugins/tmux-logging#b5c5f7b9bc679ca161a442e932d6186da8d3538f'
set -g @plugin 'laktak/extrakto#efca89800293cbb8224463d82eeecffdb2f7036a'
# Mostly same to extrakto, not sure which one I like more so
set -g @plugin 'fcsonline/tmux-thumbs#ae91d5f7c0d989933e86409833c46a1eca521b6a'
set -g @plugin 'schasse/tmux-jump#2ff4940f043cd4ad80fa25c6efa33063fb3b386b'
set -g @plugin 'wfxr/tmux-fzf-url#93ca6fc03a87627153f6e67ea81a1c01e1e44988'
set -g @plugin 'tmux-plugins/tmux-cowboy#75702b6d0a866769dd14f3896e9d19f7e0acd4f2'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git init ~/.tmux/plugins/tpm' ; run 'git -C ~/.tmux/plugins/tpm remote add origin https://github.com/Riatre/tpm' ; run 'git -C ~/.tmux/plugins/tpm fetch --depth 1 origin 597ae8842a32aaa71627c52f89d817af5e090182' ; run 'git -C ~/.tmux/plugins/tpm checkout --recurse-submodules FETCH_HEAD'"
run '~/.tmux/plugins/tpm/tpm'
# }}}
# HACK {{{
# HACK: Swap \ and | in tmux-pain-control
unbind "\\"
unbind "|"
bind-key "\\" split-window -h -c "#{pane_current_path}"
bind-key "|" split-window -fh -c "#{pane_current_path}"
# HACK: Raise escape-time to workaround quirks in some terminal emulators (wezterm)
set -g escape-time 10
# }}}
# vim: set foldmethod=marker :