-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
92 lines (82 loc) · 3.59 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
## for vim
set-option -s escape-time 10
## misc
set -g mouse on
set -g default-shell $SHELL
set-option -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL || $SHELL"
set-option -g history-limit 10000
set-window-option -g mode-keys vi
## appearance
set -g status-style bg=colour235
set-option -g status-justify "centre"
set-option -g status-interval 10
set-option -g status-position top
set-window-option -g window-status-style bg=colour26,fg=colour253
set-window-option -g window-status-current-style bg=colour20,fg=colour253,bold
set-window-option -g window-status-format ""
set-window-option -g window-status-current-format ""
set -g status-left-length 100
set -g status-left "#[fg=colour235, bg=colour110] #S > #W > #P #[fg=colour24, bg=colour255] W:#(curl globalip.me) L:#{ip} #[fg=colour24, bg=colour255]"
set -g status-right-length 100
# set -g status-right "#[fg=colour202, bg=colour221] #{battery_percentage} #[fg=colour230, bg=colour240] %Y/%m/%d(%a.) %H:%M #[fg=colour230, bg=colour240]"
set -g status-right "#[fg=colour202, bg=colour221] #{battery_percentage} #[fg=colour253, bg=colour2] #(tmux-mem-cpu-load -i 2 -a 0) #[fg=colour230, bg=colour240] %Y/%m/%d(%a.) %H:%M #[fg=colour230, bg=colour240]"
# set -g window-style 'bg=colour234'
# set -g window-active-style 'bg=colour235'
## plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-online-status'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'thewtex/tmux-mem-cpu-load'
set -g @plugin 'pwittchen/tmux-plugin-ip'
# resurrect, continuum
set -g @resurrect-strategy-nvim 'session'
set -g @continuum-boot 'on'
set -g @continuum-restore 'on'
set -g @continuum-save-interval '15'
# pain-control
set-option -g @pane_resize '2'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'
# keybind
unbind-key C-b
set-option -g prefix C-t
bind-key C-t send-prefix
setw -g mode-keys vi
bind-key v copy-mode \; display "Copy mode"
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'S-v' send-keys -X select-line
bind-key -T copy-mode-vi 'Escape' send -X clear-selection
bind-key -T copy-mode-vi 'C-[' send -X cancel
bind-key -T copy-mode-vi 'C-a' send -X start-of-line
bind-key -T copy-mode-vi 'C-e' send -X end-of-line
bind-key -T copy-mode-vi 'M-f' send -X next-word
bind-key -T copy-mode-vi 'M-b' send -X previous-word
bind-key -T copy-mode-vi 'C-u' send -X scroll-up
bind-key -T copy-mode-vi 'C-d' send -X scroll-down
unbind-key p
set-option -g @paste 'p'
bind-key c new-window -c "#{pane_current_path}"
bind-key % split-window -hc "#{pane_current_path}"
bind-key '"' split-window -vc "#{pane_current_path}"
bind-key ( switch-client -p
bind-key ) switch-client -n
bind-key D choose-client
bind-key L switch-client -l
bind-key [ previous-window
bind-key ] next-window
bind-key c new-window
bind-key d detach-client
bind-key s choose-session
bind-key w choose-window
bind-key x confirm-before -p "kill-pane #P? (y/n)" kill-pane
bind-key r source-file ~/.tmux.conf\; display-message "Reload Config!!"
bind-key -n C-o select-pane -t :.+
# bind-key -n \; send-keys ':'
# bind-key -n : send-keys '\;'