-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
113 lines (86 loc) · 3.89 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
## scroll buffer
#set-option -g history-limit 10000
# キーバインド
## 既定のPrefixキー(Ctrl+b)の割り当てを解除
unbind-key C-b
## Ctrl+tをPrefixキーにする
set-option -g prefix C-t
bind-key C-t send-prefix
# prefix + m でマウス選択モード切替
# set-option -g mouse-select-pane
# bind-key m set-option -g mouse-select-pane
## kill window
unbind-key &
bind-key k confirm-before kill-window
bind-key C-k confirm-before kill-window
## 画面分割
bind-key 1 break-pane
bind-key 2 select-layout even-vertical
bind-key 3 select-layout even-horizontal
unbind-key %
bind-key | split-window -h
bind-key - split-window -v
#bind-key o select-pane -U
#bind-key h select-layout even-horizontal
#bind-key v select-layout even-vertical
#bind-key f select-layout active-only
## prefix + r で設定ファイルを再読み込み
bind-key r source-file ~/.tmux.conf \; display-message "tmux RELOADED!!"
# 表示
## Titles
set-option -g set-titles on
set-option -g set-titles-string '#W(#P) - #T'
set-window-option -g automatic-rename on
## ステータスライン更新間隔(秒)
set-option -g status-interval 5
set-option -g status-left-length 100
set-option -g status-right-length 50
## 左ステータス(タイトルを表示)
set-option -g status-left '#[default]'
## 右ステータス(現在時刻を表示)
## 日付/時刻部分はstrftime()と同様の書式
set-option -g status-right '#[fg=bold,bg=cyan,bold] [%m/%d(%a) %H:%M]#[default]'
## ウィンドウステータス
set -g status-fg white
set -g status-bg colour234
set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]⮀'
set -g window-status-format "#[fg=white,bg=colour234] #I #W "
set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=colour25,bg=colour39,noreverse,bold] #I ⮁ #W #[fg=colour39,bg=colour234,nobold]⮀"
#set-option -g status-right-length 99 # 右ステータスも長さ制限可
## ウィンドウマネージャ向けのタイトル
set-option -g set-titles on
set-option -g set-titles-string "[tmux]#T \"#W\"(#I/#P) @ #H"
## 色
set -g pane-active-border-style "fg=colour66"
set -g pane-border-style "fg=colour66"
# set -g pane-border-style "fg=white,bg=black"
# set -g pane-active-border-style "fg=white,bg=black"
# マウス
# set -g mode-mouse on
# set -g mouse-resize-pane on
# set -g mouse-select-pane on
# set -g mouse-select-window on
# set-option -gw mode-mouse off
# bind-key m \
# if-shell "tmux show-options -gw mode-mouse | grep off" "set-option -gq mouse-utf8 on" "set-option -gq mouse-utf8 off" \;\
# if-shell "tmux show-options -gw mode-mouse | grep off" "set-option -gq mouse-resize-pane on" "set-option -gq mouse-resize-pane off" \;\
# if-shell "tmux show-options -gw mode-mouse | grep off" "set-option -gq mouse-select-pane on" "set-option -gq mouse-select-pane off" \;\
# if-shell "tmux show-options -gw mode-mouse | grep off" "set-option -gq mouse-select-window on" "set-option -gq mouse-select-window off" \;\
# if-shell "tmux show-options -gw mode-mouse | grep off" "set-option -gw mode-mouse on" "set-option -gw mode-mouse off"
# その他
# set-window-option -g utf8 on
set-option -g base-index 1
set-option -g history-limit 4096
set-option -s escape-time 100
#set-option -g mouse-select-pane off
#set-option -g mouse-resize-pane off
#set-option -g mouse-select-window off
set-option -g set-clipboard on
## copy
set -g default-command "reattach-to-user-namespace -l $SHELL"
# set-option -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL || $SHELL"
# set-option -g default-command $SHELL
# set-option -g default-command "reattach-to-user-namespace -l zsh"
bind C-q run-shell 'reattach-to-user-namespace tmux-pbcopy'
set -g default-command /usr/local/bin/fish
# set -g default-shell /usr/local/bin/fish