-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
90 lines (79 loc) · 3.05 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
# -----------------------
# Basic config
# -----------------------
# set -g default-shell /usr/bin/zsh
set -g default-terminal screen-256color
set -sg escape-time 0
set -g history-limit 5000
set -g prefix C-a
setw -g mouse on
# -----------------------
# Key Bindings
# -----------------------
unbind C-b
bind C-a send-prefix
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# -----------------------
# Color Config
# -----------------------
status_bg_color='black'
status_fg_color='white'
# -----------------------
# Status Bar Config
# -----------------------
set -g status-style fg=$status_fg_color,bg=$status_bg_color
set -g status-left-length 100
set -g status-right-length 120
set -g status-justify absolute-centre
set -g status-position top
set -g status-interval 1
set -g status-left " #[fg=green]Session: #S #[fg=yellow]Window #I #[fg=cyan]Pane: #P #{prefix_highlight}"
set -g status-right " #[fg=cyan][%Y-%m-%d(%a) %H:%M:%S] #{weather} "
set -g focus-events on
# Window list colors
setw -g window-status-style fg=cyan,bg=default,dim
setw -g window-status-current-style fg=cyan,bg=red,bright
set -g window-status-format '#[fg=colour196]#I:#(pwd="#{pane_current_path}"; echo ${pwd####*/})'
set -g window-status-current-format '#[fg=colour255,bg=colour124][#I:#(pwd="#{pane_current_path}"; echo ${pwd####*/})]'
# -----------------------
# Pane Style
# -----------------------
set -g window-style 'bg=colour239'
set -g window-active-style 'bg=colour234'
set -sa terminal-overrides ',xterm-256color:RGB'
# -----------------------
# Copy Mode
# -----------------------
setw -g mode-keys vi
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send -X copy-pipe-and-cancel "xsel -ip && xsel -op | xsel -ib"
bind -T copy-mode-vi Enter send -X copy-pipe-and-cancel "xsel -ip && xsel -op | xsel -ib"
bind -T copy-mode C-u send-keys -X page-up
bind -T copy-mode C-d send-keys -X page-down
# -----------------------
# Plugin Config
# -----------------------
set -g @plugin 'tmux-plugins/tpm' # tmuxのplugin manager
set -g @plugin 'tmux-plugins/tmux-recurrect' # PCを再起動してもセッションを復帰できるようにする
set -g @plugin 'tmux-plugins/tmux-continuum' # tmux-resurrectを自動で操作する
set -g @plugin 'tmux-plugins/tmux-yank' # tmuxのヤンクをOSのクリップボードと共有する
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'xamut/tmux-weather'
set -g @plugin 'thewtex/tmux-mem-cpu-load'
set -g @continuum-restore 'on' # tmux実行時に自動的セッションをリストア
set -g @prefix_highlight_bg 'white'
set -g @prefix_highlight_fg 'cyan'
set -g @prefix_highlight_show_copy_mode 'on'
set -g @prefix_highlight_copy_prompt 'Copy'
set -g @prefix_highlight_show_sync_mode 'on'
set -g @prefix_highlight_sync_prompt 'Sync'
set -g @prefix_highlight_sync_mode_attr 'fg=default,bg=green'
set -g @tmux-weather-location "Tokyo"
set -g @tmux-weather-format "%l:+%c+%t"
set -g @tmux-weather-units "m"
run '~/.tmux/plugins/tpm/tpm'