-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
90 lines (67 loc) · 3.54 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
# ========================================= General ===============================
setw pane-base-index 1 # Start pane index with 1(Don't start with 0)
set-option base-index 1 # Start window index with 1(Don't start with 0)
#
# ========================================= Status bar ============================
# ステータスバーをトップに配置する
set-option status-position top
# 左右のステータスバーの長さを決定する
set-option status-left-length 90
set-option status-right-length 90
# #H => マシン名
# #P => ペイン番号
# 最左に表示
set-option status-left ''
set-option status-right 'Yozakura Project'
setw monitor-activity on # -----|
set visual-activity on # ------------ enable VisualNotification
#
# ========================================= Visuals ===============================
set default-terminal "screen-256color" # use 256 color
# センタライズ(主にウィンドウ番号など)
set-option status-justify centre
#
# ======================================== Key binds ===============================
set prefix C-a # Change prefix from C-b to C-a
unbind C-b # literally, unbind C-b
# Vimのキーバインドでペインをリサイズする
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
bind h select-pane -L # ----------------|
bind j select-pane -D # ----------------|
bind k select-pane -U # ----------------|
bind l select-pane -R # ----------------------- move among panes using Vim key-bind
bind -r C-h select-window -t :- # ------|
bind -r C-l select-window -t :+ # ------|
# -------------- copy-mode -------------------
set-window-option mode-keys vi # use vi-like keymode while copy-mode
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" # ----|
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" # - y key to end copy-mode
#
# ======================================== Plugins ==================================
# --------------- List of plugins ---------------
set @plugin 'tmux-plugins/tpm' # For Tmux Plugin Manager
set @plugin 'tmux-plugins/tmux-sensible' # For Tmux Plugin Manager
set @plugin 'tmux-plugins/tmux-online-status' #show online status
set @plugin 'tmux-plugins/tmux-cpu' # show CPU used percentage
set @plugin 'tmux-plugins/tmux-urlview' # Quickly open any url on the terminal window
set @plugin 'tmux-plugins/tmux-resurrect' # save sessions for reboot,etc
# Other examples:
# set @plugin 'github_username/plugin_name'
# set @plugin 'git@github.com/user/plugin'
# set @plugin 'git@bitbucket.com/user/plugin'
# --------------- plugin settings ----------------
set @resurrect-capture-pane-contents 'on' # save pane contents with tmux-resurrect
set @resurrect-strategy-vim 'session' # save vim contents with tmux-resurrect
# ==================== Reference sites ===================================
# == ==
# == https://qiita.com/succi0303/items/cb396704493476373edf ==
# == https://github.com/tmux-plugins ---> Plugins ==
# == http://wonderwall.hatenablog.com/entry/2016/07/02/002553 ==
# == https://qiita.com/b4b4r07/items/01359e8a3066d1c37edc ==
# == https://qiita.com/jyotti/items/5383d909f7307762fefa -> copy mode ==
# ========================================================================
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'