-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
executable file
·97 lines (71 loc) · 3.19 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
# Define vertical and horizontal splits
bind @ split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Restore clear screen to use <prefix> C-l
bind C-l send-keys 'C-l'
# Make Shift+Arrow keys work in terminals inside tmux
set-window-option -g xterm-keys on
# Smart pane switching with awareness of vim splits
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# Mouse help for scrolling
set -g mouse on
# Reattach to user namespace
set-option -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL || $SHELL"
# Vi mode
set-window-option -g mode-keys vi
# Vi copy
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
# Prevent automatic rename of windows
set-option -g allow-rename off
# Status update interval
set -g status-interval 5
# Basic status bar colors
set -g status-style fg=colour240,bg=colour233
# Left side of status bar
set -g status-left-style bg=colour233,fg=colour243
set -g status-left-length 40
set -g status-left "#[fg=colour39,bg=colour240,nobold] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #I:#P "
# Right side of status bar
set -g status-right-style bg=colour233,fg=colour243
set -g status-right-length 150
set -g status-right "#[fg=colour39,bg=colour240,nobold] #{sysstat_cpu}#[fg=colour39,bg=colour240,nobold] #[bg=colour233,fg=colour243] | #[fg=colour39,bg=colour240,nobold] #{sysstat_mem}#[fg=colour39,bg=colour240,nobold] #[bg=colour233,fg=colour243] | #[fg=colour39,bg=colour240,nobold] #{sysstat_swap}#[fg=colour39,bg=colour240,nobold] #[bg=colour233,fg=colour243] | #[fg=colour39,bg=colour240,nobold] #{sysstat_loadavg} #[fg=colour232,bg=colour39,nobold] %H:%M:%S "
# Window status
set -g window-status-format " #I:#W "
set -g window-status-current-format " #I:#W "
# Current window status
set -g window-status-current-style bg=colour39,fg=colour232
# Window with activity status
set -g window-status-activity-style bg=colour233,fg=colour75
# Window separator
set -g window-status-separator ""
# Pane border
set -g pane-border-style bg=default,fg=colour238
# Active pane border
set -g pane-active-border-style bg=default,fg=colour39
# Pane number indicator
set -g display-panes-colour colour233
set -g display-panes-active-colour colour245
# Clock mode
set -g clock-mode-colour colour39
set -g clock-mode-style 24
# Message
set -g message-style bg=colour39,fg=black
# Command message
set -g message-command-style bg=colour233,fg=black
# Mode
set -g mode-style bg=colour39,fg=colour232
# tpm
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'samoshkin/tmux-plugin-sysstat'
# auto renumber windows
set-option -g renumber-windows on
run '~/.tmux/plugins/tpm/tpm'