-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
140 lines (112 loc) · 4.23 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
# prefixキーをC-tに変更する
set -g prefix C-t
# 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
# i でペインを立てに分割する
bind i split-window -h
# v でペインを横に分割する
bind v 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
# 256色端末を使用する
#set -g default-terminal "screen-256color"
#set -g default-terminal xterm
# ステータスバーの色を設定する
set -g status-fg white
set -g status-bg black
# ウィンドウリストの色を設定する
set-window-option -g window-status-current-style bg=default,dim
# アクティブなウィンドウを目立たせる
set-window-option -g window-status-current-style bg=red,dim
# ペインボーダーの色を設定する
set-option -g pane-border-style fg=green
set-option -g pane-border-style bg=black
# アクティブなペインを目立たせる
set-option -g pane-active-border-style bg=yellow,fg=white
# コマンドラインの色を設定する
set-option -g message-style bg=black,fg=white,bright
# ステータスバーを設定する
setw -g window-status-current-format "[P:#P/W:#I]#T"
setw -g window-status-format '[P:#P/W:#I]#T'
setw -g automatic-rename on
set -g set-titles on
## 左パネルを設定する
set -g status-left-length 40
#set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"
set -g status-left "#H | #S "
## 右パネルを設定する
#set -g status-right "#[fg=cyan][%Y-%m-%d(%a) %H:%M]"
set -g status-right "#(/usr/local/bin/toilet)#(date +' '%Y/%m/%d' '%T)"
## リフレッシュの間隔を設定する(デフォルト 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
setw -g mode-keys vi
### ↓ 追加 ###
### clock ###
setw -g clock-mode-style 24
### buffer ###
set -g buffer-limit 32
#set -g history-limit 999999999
set -g history-limit 300000
#set -g set-clipboard on
unbind C-b
#bind -n C-b run-shell "/bin/sh /home/ozawa/bin/tmux-copy-buffer"
# kill K
#unbind k
#unbind C-k
#bind k "kill-window"
#bind C-k "kill-window"
# create window
bind C-c new-window
# ウィンドウの移動
bind C-t next-window
### コマンド同時実行
bind s set synchronize-panes on
bind p set synchronize-panes off
# display-panesの時間伸ばす
set-option -g display-panes-time 3000
# キーバインド有効時間を伸ばす
set-option -g repeat-time 9999
# tmuxのステータスバーにクリップボードの履歴の一番新しいものを表示させる
set-option -g status-right "[#[fg=white]#(pbpaste)#[default]]"
set-option -g status-right-length 99
set-option -g status-interval 1
#set-option -g default-shell /bin/bash
#set-option -g default-command /bin/bash
set-option -g default-shell /bin/zsh
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
# クリップボード共有を有効にする
# vim のコピーペースト有効化
bind-key -T copy-mode-vi b send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
# contextやnamespaceをterminalで常に表示
set-option -g status-left '#(/bin/bash $HOME/dotfiles/.tmux/kube.tmux 256 colour10 cyan)'
set-option -g status-left-length 80