This repository has been archived by the owner on Mar 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
executable file
·166 lines (124 loc) · 4.93 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
# Prefix key setting
set-option -g prefix C-s
# C-s*2でtmux内のプログラムにC-sを送る
bind-key C-s send-prefix
unbind-key C-b
# nextwindow
bind-key -r n next-window
bind-key -r p previous-window
#ウィンドウを実行コマンド名で自動リネーム
set-window-option -g automatic-rename on
# コピーモードはviバインド
set-window-option -g mode-keys vi
# Immediatly ESC
set-option -s escape-time 0
# shell
set-option -g default-shell /bin/zsh
set-option -g default-command /bin/zsh
# history
set-option -g history-limit 10000
# Mouse setting (デフォルトはOFFにしておいて、prefix+mでマウスモードを切替える) {{{
# http://qiita.com/kawaz/items/7b15e18ca8e072c1dc57
bind-key m \
if-shell "tmux show-options -g mouse | grep off" "set-option -g mouse on; set-option mouse on" "set-option -g mouse off; set-option mouse off"
set-option -g mouse off
# }}}
# Syncronize Panes {{{
unbind-key s
set-option -gw synchronize-panes off
bind-key s \
if-shell "tmux show-window-options synchronize-panes | grep off" "set-window-option synchronize-panes on" "set-window-option synchronize-panes off"
# }}}
# Looking setting. {{{
#source-file ~/repos/github.com/altercation/solarized/tmux/tmuxcolors-dark.conf
# set-option easy findable active pane.
set-option -g pane-active-border-fg black
set-option -g pane-active-border-bg brightgreen
### ref) http://qiita.com/succi0303/items/cb396704493476373edf
# 256色端末を有効に
set-option -g default-terminal "screen-256color"
# ウィンドウリストの色を設定する
set-window-option -g window-status-fg cyan
set-window-option -g window-status-bg default
set-window-option -g window-status-attr dim
# アクティブなウィンドウを目立たせる
set-window-option -g window-status-current-fg white
set-window-option -g window-status-current-bg red
set-window-option -g window-status-current-attr bright
# コマンドラインの色を設定する
set-option -g message-fg white
set-option -g message-bg black
set-option -g message-attr bright
# }}}
# Key binding {{{
# Vi風のキーバインド改良版 {{{
# http://tegetegekibaru.blogspot.jp/2012/08/tmux-vi.html
# コピーモード{{{
# コピーモード突入 デフォルトでは bind-key [ copy-mode
#bind-key v copy-mode
# bind-keyなどはos_localのスクリプトで設定
# }}}
# ペインの移動Vi風
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# ペインリサイズ関連Vi風
bind-key -r C-h resize-pane -L 5
bind-key -r C-l resize-pane -R 5
bind-key -r C-j resize-pane -D 5
bind-key -r C-k resize-pane -U 5
#}}}
# Split pane
unbind-key %
unbind-key '"'
bind-key | split-window -h
bind-key _ split-window -v
#bind-key C-h select-layout even-horizontal
#bind-key C-v select-layout even-vertical
# Move last pane or window.
bind-key C-s run "tmux last-pane || tmux last-window || tmux new-window"
# Reload .conf
unbind-key r
bind-key r source-file ~/.tmux.conf \; display ".tmux.conf Reloaded!"
#unbind-key D
#bind-key D detach
bind-key X confirm-before 'kill-pane'
bind-key K confirm-before 'kill-window'
bind-key Q confirm-before 'kill-session'
# }}}
if-shell "uname | grep -q Darwin" "source-file ~/repos/github.com/bundai223/dotfiles/os_local/osx/.tmux.conf.osx" "source-file ~/repos/github.com/bundai223/dotfiles/os_local/unix/.tmux.conf.unix"
# ステータスバーを設定する {{{
# ステータスバーの色を設定する
set-option -g status-fg white
set-option -g status-bg black
## ヴィジュアルノーティフィケーションを有効にする
set-window-option -g monitor-activity on
set-option -g visual-activity on
## ステータスバーを上部に表示する
set-option -g status-position top
# 左右のステータスバーの長さを決定する
set-option -g status-left-length 60
set-option -g status-right-length 90
# #H => マシン名
# #P => ペイン番号
# 最左に表示
#set-option -g status-left '#H:[#P]'
# Wi-Fi、バッテリー残量、現在時刻
# 最右に表示
# set-option -g status-right '#(get_ssid) #(battery -c tmux) [%Y-%m-%d(%a)]'
# ステータスバーを1秒毎に描画し直す
set-option -g status-interval 1
# センタライズ(主にウィンドウ番号など)
set-option -g status-justify centre
run-shell "powerline-daemon -q"
if-shell 'test -f /usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf' 'source-file /usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf'
if-shell 'test -f /usr/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf' 'source-file /usr/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf'
# }}}
#追加する
set -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tmux-resurrect \
'
# tmux-plugins/tmux-resurrect-auto \
if-shell "test -f ~/repos/github.com/tmux-plugins/tpm/tpm" "run-shell '~/repos/github.com/tmux-plugins/tpm/tpm'"