-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
159 lines (153 loc) · 5.35 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
# use zsh for OSX installed via homebrew
if-shell 'test "$(uname -s)" = Darwin' \
'set-option -g default-shell /usr/local/bin/zsh'
if-shell 'test "$(uname -s)" = Darwin' \
'set-option -g default-command "reattach-to-user-namespace -l zsh"'
# vi mode
set-window-option -g mode-keys vi
# set prefix key to C-1
set -g prefix C-z
unbind C-b
bind C-z send-prefix
# 256 colours terminal
set-option -g default-terminal screen-256color
# reload configurtaion
# ERROR: couldn't establish current session **
# bind-key r source-file ~/.tmux.conf; display-message "Reload Config!!"
# # mouse binding
# # NOTE:
# # [tmux v2.1からmouse関連の設定が変わった - Qiita]
# # (http://qiita.com/jyotti/items/70a3a8035d767f99f93d)
# set -g mouse on
# #set -g mode-mouse on
# #set -g mouse-resize-pane on
# #set -g mouse-select-pane on
# #set -g mouse-select-window on
#
# # http://unix.stackexchange.com/questions/23138/esc-key-causes-a-small-delay-in-terminal-due-to-its-alt-behavior
# set -g escape-time 0
#
# # ssh: http://d.hatena.ne.jp/mobcov/20111217/1324093662
# unbind s
# bind-key s command-prompt "new-window -n ssh 'ssh -t %1'"
# bind-key ^s command-prompt "split-window -h 'ssh -t %1'"
# bind-key S command-prompt "split-window 'ssh -t %1'"
#
#
# # clipboard copy
# # for OSX
# if-shell 'test "$(uname -s)" = Darwin' \
# 'bind-key > run-shell "tmux save-buffer - | reattach-to-user-namespace pbcopy ; tmux display-message copied"'
# # for Linux
# if-shell 'which xsel >/dev/null 2>&1' \
# 'bind-key > run-shell "tmux save-buffer - | xsel -i -b ; tmux display-message copied"'
#
# # set current directory path (result of pwd) to clipboard
# #bind-key z run-shell 'pwd | tr -d "\n" | xsel -i -b' \; display-message "pwd clipped !"
# #bind-key z run-shell 'echo $PWD | tr -d "\n" | xsel -i -b' \; display-message "pwd clipped !"
# # FIXME: commands remain on shell ... are there any option like <silent> ?
# bind-key z send-keys "pwd | tr -d '\\n' | xsel -i -b\n" \; display-message "pwd clipped !"
#
# # resize buffer with hjkl
# bind-key H resize-pane -L 10
# bind-key L resize-pane -R 10
# bind-key J resize-pane -D 5
# bind-key K resize-pane -U 5
#
# bind-key h select-pane -L
# bind-key l select-pane -R
# bind-key j select-pane -D
# bind-key k select-pane -U
#
# # move window (duplicated with command which has not ctrl)
# bind-key C-n next-window
# bind-key C-p previous-window
#
# # save current pain(history?) to clipboard
# bind-key C run "tmux capture-pane -S -10000; tmux show-buffer | xsel -i -b"
#
# # copy-mode ^[
# unbind ^"["
# bind -r ^"[" copy-mode
# unbind ^]
# bind -r ^] paste-buffer
#
# hand over the pwd when split/create window
bind c new-window -c "#{pane_current_path}"
bind % split-window -hc "#{pane_current_path}"
bind '"' split-window -vc "#{pane_current_path}"
#
# # ステータスラインカスタム関連
# # set -g status-attr dim
# set -g status-left-length 32
# set -g status-right-length 150
# #
# # set -g status-fg white
# # set -g status-bg colour234
# # set -g window-status-activity-attr bold
# # set -g pane-border-fg colour245
# # set -g pane-active-border-fg colour39
# #
# # set -g status-left '#[fg=colour0,bg=colour22,bold] #(hostname -s) #[fg=colour245,bg=colour238,bold] #(whoami) '
# # set -g window-status-format '#[fg=white,bg=colour234] #I #W '
# # set -g window-status-current-format '#[fg=white,bg=colour39,noreverse,bold] #I ⮁ #W '
# # set -g status-right '#[fg=colour31,bg=colour255,bold] %Y-%m-%d(%a) %H:%M#[default]'
# set -g message-attr bold
# set -g message-fg white
# set -g message-bg red
#
# set-option -g status-left "\
# #[bg=colour148]#[fg=colour234] #S:#I.#P \
# #[bg=colour054]#[fg=colour255] #h \
# #[fg=colour054]#[bg=colour234]"
# set-option -g status-right "\
# #[fg=colour236]#[fg=colour253]#[bg=colour236]\
# CPU:#{cpu_percentage} \
# #[fg=colour238]#[fg=colour254]#[bg=colour238]\
# Mem: #{mem_percentage}%%#[fg=colour254] \
# #[fg=colour240]#[fg=colour255]#[bg=colour240]\
# %Y/%m/%d(%a) %H:%M "
# set -g pane-border-bg colour0
# set -g pane-border-fg colour238
# set -g pane-active-border-bg colour0
# set -g pane-active-border-fg colour119
#
# set -g status-position bottom
# set -g status-justify left
# set -g status-bg colour234
#
# setw -g window-status-current-bg colour239
# setw -g window-status-current-attr bold
# setw -g window-status-current-format "\
# #[fg=colour239]#[bg=colour234]#[bg=colour239]#[fg=colour119]\
# #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]\
# #F#[fg=colour239]#[bg=colour234]"
#
# setw -g window-status-fg colour244
# setw -g window-status-bg colour234
# setw -g window-status-attr none
# setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
#
#
#
# # ウィンドウクローズ時にウィンドウ番号を詰める
# set-option -g renumber-windows on
#
#
# # from tmux-plugins/tmux-sensible
# # tmux messages are displayed for 4 seconds
# set -g display-time 4000
# # refresh 'status-left' and 'status-right' more often
# set -g status-interval 5
# # emacs key bindings in tmux command prompt (prefix + :) are better than
# # vi keys, even for vim users
# set -g status-keys emacs
# # focus events enabled for terminals that support them
# set -g focus-events on
#
# plugins
# プラギンマネージャ
set -g @plugin 'tmux-plugins/tpm'
# 状態を保存/再現する
set -g @plugin 'tmux-plugins/tmux-resurrect'
run '~/.tmux/plugins/tpm/tpm'