-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
69 lines (62 loc) · 2.08 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
# Plugins
# Hit prefix + I to fetch the plugin and source it. You should now be able to use the plugin.
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-cpu'
# prefix + Ctrl-s - save
# prefix + Ctrl-r - restore
# Mouse support
set -g mouse on
# Split windows into panes
unbind '"'
unbind %
unbind v
unbind c
bind s split-window -v -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Start windows and panes at 1
set -g base-index 1
setw -g pane-base-index 1
# Move pane
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Reload config
unbind r
bind r source-file ~/.tmux.conf\; display "Configuration reloaded."
# True color
set -g default-terminal "xterm-256color"
# Status Bar
set -g status on
set -g status-interval 1
set -g status-justify centre
set -g status-position top
set -g status-bg colour233
set -g status-fg colour249
# Left
set -g status-left-length 70
set -g status-left '\
#[fg=green,bg=colour233]#(whoami)@#h \
#[fg=colour233,bg=colour237] \
#[fg=colour249,bg=colour237]#(echo "#{pane_current_path}" | rev | cut -d"/" -f-2 | rev) \
#[fg=colour237,bg=colour245] \
#[fg=colour233,bg=colour245]#{pane_current_command} \
#[fg=colour245,bg=colour233] \
#[default] \
'
# Right
## Ping status args are for mac env
set -g status-right-length 80
set -g status-right '\
#[fg=249]#(cd #{pane_current_path} && git branch && echo " $(git rev-parse --abbrev-ref HEAD)") \
#[fg=colour245]#[fg=colour233,bg=colour245] CPU #{cpu_fg_color}#{cpu_percentage} \
#[fg=colour233,bg=colour245] MEM #{ram_fg_color}#{ram_percentage} \
#[fg=colour249]#[fg=colour233,bg=colour249] %a %m/%d %H:%M \
#((ping -W 1000 -c 1 8.8.8.8 | grep ttl | awk -F= "{print \$NF}" || echo "Offline") && sleep 2) \
'
## Show internet status
#(dig +tries=1 +time=1 +short +search @8.8.8.8 google.com > /dev/null && echo "✔" || echo "✖") \
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'