-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
119 lines (93 loc) · 4.57 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
# vim:fileencoding=utf-8:ft=tmux
# Ring the bell if any background window rang a bell
set -g bell-action any
# Default termtype. If the rcfile sets $TERM, that overrides this value.
set -g default-shell $SHELL
# TrueColor. Related: https://gist.github.com/bbqtd/a4ac060d6f6b9ea6fe3aabe735aa9d95
set -g default-terminal "xterm-256color"
# tell Tmux that outside terminal supports true color
set -sa terminal-overrides ",*256col*:Tc"
set -ga terminal-features "*:hyperlinks"
bind r source ~/.tmux.conf\; display "~/.tmux.conf sourced!"
# Keep your finger on ctrl, or don't
bind ^D detach-client
# Create splits and vertical splits
bind ^V split-window -h
bind ^S split-window
# Pane resize in all four directions using vi bindings.
# Can use these raw but I map them to shift-ctrl-<h,j,k,l> in iTerm.
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r H resize-pane -L 5
bind -r L resize-pane -R 5
# map Vi movement keys as pane movement keys
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# and use C-h and C-l to cycle thru panes
bind C-h select-window -t :-
bind C-l select-window -t :+
# Use vi keybindings in copy and choice modes
set -g mode-keys vi
bind -T copy-mode-vi 'v' send -X begin-selection # Begin selection in copy mode.
bind -T copy-mode-vi 'C-v' send -X rectangle-toggle # Begin selection in copy mode.
bind -T copy-mode-vi 'y' send -X copy-pipe 'osc52-yank' # Yank selection in copy mode.
# easily toggle synchronization (mnemonic: e is for echo)
# sends input to all panes in a given window.
bind e setw synchronize-panes on
bind E setw synchronize-panes off
# set first window to index 1 (not 0) to map more to the keyboard layout...
# set-option -g base-index 1
set -g base-index 1
set -g pane-base-index 1
set -g pane-border-lines single
set -g message-style fg=colour16,bg=colour221,bold
set -g status-bg colour234
set -g status-right-length 100
# set -g status-justify left
# set -g window-status-separator ' '
# set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour234,nobold]#[default]'
# set -g window-status-format "#[fg=colour235,bg=colour252,bold] #I | #W #[default]"
# set -g window-status-current-format "#[fg=colour234,bg=colour39]#[fg=black,bg=colour39,noreverse,bold] #P-#I | #W #[fg=colour39,bg=colour234,nobold]"
set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour234,nobold]#[default]'
set -g status-justify left
set -g window-status-separator ''
set -g window-status-format "#[fg=colour234,bg=colour238]#[fg=colour247,bg=colour238,bold] #I #W #[fg=colour238,bg=colour234]#[default]"
set -g window-status-current-format "#[fg=colour234,bg=colour111]#[fg=grey23,bg=colour111,noreverse,bold] #I #W #[fg=colour111,bg=colour234]#[default]"
set -g status-right "#{prefix_highlight} #[fg=green]#(tmux-mem-cpu-load --colors -a 0 --powerline-right --interval 1) #[fg=green]#[fg=black,bg=green] #{network_bandwidth} #[default]"
# set -g status-left '#[fg=blue] ❐ #S #[default]#'
# set -g status-justify absolute-centre
# set -g window-status-separator " "
# set -g window-status-current-format "#[fg=white]#[fg=default]"
# set -g window-status-format "#[fg=white]#[default]"
# set -g status-right "#{prefix_highlight} #[fg=green]#(tmux-mem-cpu-load --colors -a 0 --powerline-right --interval 1) #[fg=green]#[fg=black, bg=green] #{network_bandwidth} #[default]"
# Screen like binding
unbind C-b
set -g prefix C-a
bind a send-prefix
# Short escape time for vi mode
set -sg escape-time 10
# Local config
if-shell "[ -f ~/.tmux.conf.user ]" 'source ~/.tmux.conf.user'
set -g @tmux-network-bandwidth-padding 1
run-shell "if [ ! -d ~/.tmux/plugins/tpm ]; then git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm; fi"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'thewtex/tmux-mem-cpu-load'
set -g @plugin 'xamut/tmux-network-bandwidth'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-urlview'
set -g @plugin 'tmux-plugins/tmux-fpp'
set -g @plugin 'tmux-plugins/tmux-logging'
run-shell 'if [[ -z $SSH_CLIENT ]]; then tmux set -g @plugin "tmux-plugins/tmux-open"; fi'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# tmux-resurrect
set -g @resurrect-save S
set -g @resurrect-restore R
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'