-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
106 lines (93 loc) · 3.49 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
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 @continuum-restore 'on'
# set -g @continuum-boot 'on'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-net-speed'
set -g @plugin 'tmux-plugins/tmux-logging'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @plugin 'tmux-plugins/tmux-sessionist'
set -g set-clipboard on
set -g @yank_selection 'clipboard'
set -g @yank_selection_mouse 'clipboard'
set -g mode-keys vi
run -b '~/.tmux/plugins/tpm/tpm'
# unbind C-b
set -g prefix C-t
bind C-t send-prefix
set -g repeat-time 1500
set history-file ~/.tmux_history
set history-limit 50000
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind -n M-q kill-pane
bind -n M-Q kill-window
bind -n M-d split-window -h -c "#{pane_current_path}"
bind -n M-D split-window -v -c "#{pane_current_path}"
bind -n M-t new-window -c "#{pane_current_path}"
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
bind -n M-H resize-pane -L 2
bind -n M-J resize-pane -D 2
bind -n M-K resize-pane -U 2
bind -n M-L resize-pane -R 2
bind -n M-f resize-pane -Z
bind -n -r M-n select-window -t :+
bind -n -r M-p select-window -t :-
bind -r Space next-layout
set -g mouse on
set -g default-terminal "screen-256color"
set -g default-shell "/bin/bash"
set -g default-command "${SHELL}"
#
## ステータスバーの色を設定する
set -g status-fg white
set -g status-bg black
%if #{>=:version,2.9}
unbind -T prefix a
set -g window-status-style fg="cyan",bg="default","dim"
set -g window-status-current-style fg="white",bg="red","bright"
set -g pane-active-border-style bg=white
set -g message-style fg=black,bg=white,bright
%endif
if '[ $(echo $(tmux -V | cut -d" " -f2 ) \< 2.9 | bc) = 1 ]' "\
bind -T prefix a display 'Hello world' ;\
set -g window-status-fg cyan ;\
set -g window-status-bg default ;\
set -g window-status-attr dim ;\
set -g window-status-current-fg white ;\
set -g window-status-current-bg red ;\
set -g window-status-current-attr bright ;\
set -g pane-active-border-bg white ;\
set -g message-fg black ;\
set -g message-bg white ;\
set -g message-attr bright ;\
bind -T prefix a display 'Hello World!' ;\
"
set -g pane-border-format "#P #(tmux-pane-border #{pane_current_command} #{pane_pid})"
set -g display-time 10000
set -g display-panes-time 10000
set -g status-left-length 60
set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"
set -g status-justify centre
# set -g @net_speed_interfaces ""
set -g @net_speed_format "D:%8s U:%8s"
set -g status-right-length 160
set -g status-right "Net: #{net_speed} |\
#{cpu_fg_color} CPU: #{cpu_icon} #{cpu_percentage} #[fg=white] |\
#[bg=black]#[fg=cyan][%Y-%m-%d(%a) %H:%M]"
set -g monitor-activity on
set -g visual-activity on
set -g status-position top
# copy inside tmux
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# copy into both tmux & system's clipboard
bind-key -T copy-mode-vi Enter send-keys copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind -n M-s set synchronize-panes