-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathtmux.conf
55 lines (44 loc) · 1.75 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
# escape-time to 0
set-option -sg escape-time 0
# Bind ']' to use pbpaste
bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
# color
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
# use vi keys in buffer
setw -g mode-keys vi
# vim and tmux pane switch
# Smart pane switching with awareness of vim splits
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(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"
setw -q -g utf8 on
# mouse
set -g mouse on
#### statusbar ####
set -g status-interval 16
set -g status-justify centre # center align window list
set -g status-left '#{battery_icon} #{battery_percentage} [#S]'
set -g status-left-length 60
set -g status-right "#(tmux-mem-cpu-load -q --interval 2) #[fg=brightwhite,bg=colour235] %m-%d %H:%M "
set -g status-right-length 100
# default statusbar colors
set -g status-style "bg=default fg=colour195 dim"
# pane style
set -g pane-border-style 'fg=colour236 dim'
set -g pane-active-border-style 'fg=colour238 dim'
# activity
set -g monitor-activity off
set -g visual-activity off
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# user plugins
set -g @plugin 'thewtex/tmux-mem-cpu-load'
set -g @plugin 'tmux-plugins/tmux-battery'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'