-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
195 lines (171 loc) · 5.37 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# #default
# assume-paste-time 1
# # base-index 0
# bell-action any
# bell-on-alert off
# # default-command ""
# default-path ""
# default-shell "/bin/zsh"
# # default-terminal "screen"
# destroy-unattached off
# detach-on-destroy on
# display-panes-active-colour red
# display-panes-colour blue
# display-panes-time 1000
# display-time 750
# history-limit 2000
# lock-after-time 0
# lock-command "lock -np"
# lock-server on
# # message-attr none
# # message-bg yellow
# message-fg black
# message-command-attr none
# message-command-bg black
# message-command-fg yellow
# message-limit 20
# # mouse-resize-pane off
# # mouse-select-pane off
# # mouse-select-window off
# mouse-utf8 on
# # pane-active-border-bg default
# # pane-active-border-fg green
# # pane-border-bg default
# # pane-border-fg default
# # prefix C-b
# prefix2 none
# renumber-windows off
# repeat-time 500
# set-remain-on-exit off
# set-titles off
# set-titles-string "#S:#I:#W - "#T""
# status on
# status-attr none
# # status-bg green
# # status-fg black
# # status-interval 15
# # status-justify left
# status-keys emacs
# # status-left "[#S]"
# status-left-attr none
# # status-left-bg default
# # status-left-fg default
# # status-left-length 10
# status-position bottom
# # status-right ""#22T" %H:%M %d-%b-%y"
# status-right-attr none
# # status-right-bg default
# # status-right-fg default
# status-right-length 40
# status-utf8 on
# terminal-overrides "*88col*:colors=88,*256col*:colors=256,xterm*:XT:Ms=\E]52;%p1%s;%p2%s\007:Cc=\E]12;%p1%s\007:Cr=\E]112\007:Cs=\E[%p1%d q:Csr=\E[2 q,screen*:XT"
# update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
# # visual-activity off
# visual-bell off
# visual-content off
# visual-silence off
# word-separators " -_@"
# prefixキーをC-qに変更する
set -g prefix C-q
# C-bのキーバインドを解除する
unbind C-b
# キーストロークのディレイを減らす
set -sg escape-time 1
# ウィンドウのインデックスを1から始める
set -g base-index 1
# ペインのインデックスを1から始める
setw -g pane-base-index 1
# 設定ファイルをリロードする
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# C-a*2でtmux内のプログラムにC-aを送る
bind C-a send-prefix
# | でペインを縦に分割する
bind | split-window -h
# - でペインを横に分割する
bind - split-window -v
# Vimのキーバインドでペインを移動する
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 :+
# 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
# Emacs key bind to split window
bind 0 kill-pane
bind 1 break-pane
bind 2 split-window -v
bind 3 split-window -h
bind o select-pane -t :.+
bind k kill-window
# マウス操作を有効にする
setw -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
# 256色端末を使用する
set -g default-terminal "screen-256color"
# ステータスバーの色を設定する
set -g status-fg white
set -g status-bg black
# ウィンドウリストの色を設定する
setw -g window-status-fg cyan
setw -g window-status-bg default
setw -g window-status-attr dim
# アクティブなウィンドウを目立たせる
setw -g window-status-current-fg white
setw -g window-status-current-bg red
setw -g window-status-current-attr bright
# ペインボーダーの色を設定する
set -g pane-border-fg green
set -g pane-border-bg black
# アクティブなペインを目立たせる
set -g pane-active-border-fg white
set -g pane-active-border-bg yellow
# コマンドラインの色を設定する
set -g message-fg white
set -g message-bg black
set -g message-attr bright
# ステータスバーを設定する
## 左パネルを設定する
set -g status-left-length 40
set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"
## 右パネルを設定する
set -g status-right "#[fg=cyan][%Y-%m-%d(%a) %H:%M]"
## リフレッシュの間隔を設定する(デフォルト 15秒)
set -g status-interval 60
## ウィンドウリストの位置を中心寄せにする
set -g status-justify centre
## ヴィジュアルノーティフィケーションを有効にする
setw -g monitor-activity on
set -g visual-activity on
## ステータスバーを上部に表示する
set -g status-position top
# コピーモードを設定する
## クリップボード共有を有効にする(OS-X)
#set-option -g default-command "reattach-to-user-namespace -l zsh"
# for ubuntu
# sudo apt-get install xsel
# .zshrc
# alias pbcopy='xsel --clipboard --input'
# alias pbpaste='xsel --clipboard --output'
# viのキーバインドを使用
#setw -g mode-keys vi
# コピーモードの操作をvi風に設定
#bind-key -t vi-copy v begin-selection
#bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
#unbind -t vi-copy Enter
#bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
set-window-option -g mode-keys emacs
set -g @yank_selection 'primary'
unbind -t emacs-copy Enter
unbind -t emacs-copy C-w
unbind -t emacs-copy M-w
bind-key -t emacs-copy C-w copy-pipe "pbcopy"
bind-key -t emacs-copy M-w copy-pipe "pbcopy"
bind-key -t emacs-copy Enter copy-pipe "pbcopy"
bind-key C-y paste-buffer