-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
159 lines (149 loc) · 3.91 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
# reload config file
unbind r
bind r source-file ~/.tmux.conf \; display-message "~/.tmux.conf Reloaded!"
# prefix and mouse
set -g prefix C-s
set -g mouse on
# Options
set-window-option -g mode-keys vi
set-option -g status-position top
set-option -g history-limit 102400
# Repeat time limit (ms)
set-option -g repeat-time 500
# Key binding in the status line (bind-key :)
set-option -g status-keys emacs
# キーストロークのディレイを減らす
set -sg escape-time 0
# for copy paste on macOS
set-option -g default-command "reattach-to-user-namespace -l zsh"
# Bindkey
unbind h
unbind l
unbind j
unbind k
# Pane-movement
bind-key h select-pane -L
bind-key l select-pane -R
bind-key j select-pane -D
bind-key k select-pane -U
# new window
unbind C-c
bind C-c new-window
bind c new-window
# detach C-d d
unbind C-d
bind C-d detach
# displays *
unbind *
bind * list-clients
# next C-@ C-N sp n
unbind C-@
bind C-@ next-window
unbind C-N
bind C-N next-window
unbind " "
bind " " next-window
unbind n
bind n next-window
# title A
unbind A
bind A command-prompt "rename-window %%"
# other C-A
unbind C-A
bind C-A last-window
bind-key a last-window
# prev C-H C-P p C-?
unbind C-H
bind C-H previous-window
unbind C-P
bind C-P previous-window
unbind p
bind p previous-window
unbind BSpace
bind BSpace previous-window
# windows C-W w
unbind C-W
bind C-W list-windows
unbind w
bind w choose-window
# quit "\"
unbind '\'
bind '\' confirm-before "kill-server"
# kill K k
unbind K
bind K confirm-before "kill-window"
# redisplay C-L l
unbind C-L
bind C-L refresh-client
unbind l
bind l refresh-client
# :kB: focus up
unbind Tab
bind Tab select-pane -t:.+
unbind BTab
bind BTab select-pane -t:.-
# " windowlist -b
unbind '"'
bind '"' choose-window
# synchronize-panes
unbind S
#bind-key S set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}"
bind-key S set-window-option synchronize-panes
# copy-mode
bind-key C-[ copy-mode
bind-key C-] paste-buffer
bind-key > save-buffer ~/.screen_exchange
bind-key < load-buffer ~/.screen_exchange
# title
unbind t
bind t command-prompt -I "#W" "rename-window -- '%%'"
# split virtical
bind-key | split-window -h -c "#{pane_current_path}"
# split horizontal -
bind-key - split-window -c "#{pane_current_path}"
# カーソルキーでペインの大きさ変更
bind -r Up resize-pane -U 5
bind -r Down resize-pane -D 5
bind -r Left resize-pane -L 5
bind -r Right resize-pane -R 5
# ssh
unbind s
bind-key s command-prompt "new-window 'sshtmux %1'"
unbind C
bind-key C new-window -n core 'ssh -t corevnc'
unbind D
bind-key D new-window -n daemon 'ssh -t daemon'
unbind F
bind-key F new-window -n funasoul 'ssh -t funasoulvnc'
unbind N
bind-key N new-window -n ns 'ssh -t ns'
bind-key ^C select-window -t core
bind-key ^F select-window -t funasoul
bind-key ^R select-window -t ns
#===================================
# tpm - Tmux Plugin Manager
#===================================
## prefix + I ... tpm の install
## prefix + U ... tpm の update
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'catppuccin/tmux'
# catppuccin config
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator "█ "
set -g @catppuccin_window_number_position "left"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W"
set -g @catppuccin_status_modules_right "directory session date_time"
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_right_separator ""
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"
set -g @catppuccin_directory_text "#{pane_current_path}"
# Initialize TMUX plugin manager
# (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'