-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.tmux.conf
135 lines (100 loc) · 4.39 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
126
127
128
129
130
131
132
133
134
135
# Core options
# Vim keys in copy mode
set -s escape-time 5
set-option -g mouse on
set-window-option -g mode-keys vi
set-option -g history-limit 1000000
# Keys bindings
unbind C-b
set -g prefix 'C-\'
bind-key -T copy-mode-vi 'v' send -X begin-selection # Begin selection in copy mode.
# Reload config from tmux session
bind R source-file ~/.tmux.conf \; display-message "Tmux config reloaded."
# Update the TERM variable of terminal emulator when creating a new session or attaching a existing session
set -g update-environment 'DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY TERM'
# Start: Tmux plugins
set -g @plugin 'tmux-plugins/tpm'
# Reasonable defaults
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-pain-control'
# Statusbar addons
set -g @plugin 'tmux-plugins/tmux-online-status'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'thewtex/tmux-mem-cpu-load'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
# Working with copy-paste
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'Morantron/tmux-fingers'
set -g @plugin 'tmux-plugins/tmux-yank'
# Persistent session restore
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Utilities
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-urlview'
# End: Tmux plugins
# Start: Plugins settings
set -g @batt_remain_short true
set -g @urlview-key 'u'
set -g @fingers-compact-hints 0
set -g @fingers-hint-format-nocompact "#[fg=red,bold] [%s]"
set -g @online_icon "on!"
set -g @offline_icon "off!"
set -g @open-S 'https://www.google.com/search?q='
set -g @open-G 'https://github.com/search?q='
set -g @open-R 'https://github.com/'
set -g @open-P 'https://npms.io/search?q='
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-capture-pane-contents 'on'
# Disabled because of annoying issues below:
# https://github.com/tmux-plugins/tmux-continuum/issues/6
# https://github.com/tmux-plugins/tmux-resurrect/issues/86
# set -g @resurrect-save-shell-history 'on'
set -g @continuum-save-interval '10'
set -g @continuum-restore 'on'
set -g @continuum-boot 'on'
set -g @continuum-boot-options 'iterm,fullscreen'
# See https://github.com/thewtex/tmux-mem-cpu-load
set -g status-right "#{prefix_highlight} | #[fg=colour69]#(tmux-mem-cpu-load -g 5 -i 120 -m 1 -a 1)#[default] | #{online_status} - #{battery_icon} #{battery_status_fg}#{battery_percentage}#{battery_remain}#[default] | %a, %d %h - %H:%M"
# End: Plugins settings
# UI Options
# set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
# Nicely copied from this post:
# http://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
set -g pane-border-style fg=black
set -g pane-active-border-style fg=brightred
set -g message-style fg=black,bg=yellow
set -g message-command-style fg=blue,bg=black
setw -g mode-style fg=colour0,bg=colour6
setw -g window-status-format " #F#I:#W#F "
setw -g window-status-current-format " #F#I:#W#F "
active_pane_colour="#{?pane_active,cyan,colour14}"
setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
setw -g window-status-current-style fg=colour11,bg=colour0
setw -g window-status-style fg=black,bg=green,reverse
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity on
set-option -g bell-action none
setw -g clock-mode-colour colour135
setw -g mode-style fg=colour196,bg=colour238,bold
set -g pane-border-style fg=colour238,bg=colour235
set -g pane-active-border-style fg=colour51,bg=colour236
set -g status-justify left
set -g status-interval 30
set -g status-position bottom
set -g status-style fg=colour137,bg=colour236
set -g status-left-length 50
set -g status-right-length 100
setw -g window-status-current-style fg=colour81,bg=colour238,bold
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
setw -g window-status-style fg=colour138,bg=colour235,none
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-style fg=colour255,bg=colour1,bold
set -g message-style fg=colour232,bg=colour166,bold
# Initialize TMUX plugin manager
run '~/.tmux/plugins/tpm/tpm'