-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
105 lines (84 loc) · 3.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
# change prefix to C-s
set-option -g prefix C-s
unbind-key C-b
bind-key s send-prefix
bind-key C-s last-window
# use mouse
set-option -g mouse on
# options
set-option -g default-shell /usr/local/bin/fish
# see https://www.pandanoir.info/entry/2019/11/02/202146
set-option -g default-terminal 'tmux-256color'
set-option -ga terminal-overrides ',$TERM:Tc'
set-option -ga terminal-overrides ',alacritty:RGB'
# for undercurl, see https://kotaro7750.hatenablog.com/entry/tmux_vim_undercurl#tmux%E3%81%AE%E8%A8%AD%E5%AE%9A
set-option -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
set-option -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
set-option -g display-time 2000
set-option -g focus-events on
set-option -g history-limit 10000
set-option -g visual-activity on
set-option -g renumber-windows on
set-option -s escape-time 10
# window options
set-window-option -g alternate-screen on
set-window-option -g aggressive-resize on
set-window-option -g mode-keys vi
set-window-option -g main-pane-height 35
set-window-option -g main-pane-width 100
set-window-option -g monitor-activity off
set-window-option -g automatic-rename on
set-window-option -g automatic-rename-format '#{pane_current_command} […#{=-12:pane_current_path}]'
set-window-option -g set-titles on
set-window-option -g set-titles-string '#{pane_current_command} (#{pane_current_path}) on tmux #I:#P(#S)'
# status
set-option -g status-interval 5
set-option -g pane-border-status bottom
set-option -g pane-border-format ' #{pane_title} '
set-option -g pane-border-lines double
# keybinds
bind-key W confirm-before kill-window
bind-key X confirm-before kill-pane
bind-key Q confirm-before -p "respawn-pane? (y/others)" "respawn-pane -k -c '#{pane_current_path}'"
bind-key '\' confirm-before kill-session
bind-key C-[ copy-mode
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key ] run-shell "pbpaste | tmux load-buffer - && tmux paste-buffer"
bind-key C-] run-shell "pbpaste | tmux load-buffer - && tmux paste-buffer"
bind-key -r N swap-window -d -t:+
bind-key -r P swap-window -d -t:-
bind-key c new-window -c '#{pane_current_path}'
bind-key s split-window -v -c '#{pane_current_path}'
bind-key v split-window -h -c '#{pane_current_path}'
bind-key B break-pane
bind-key O join-pane -t:-.bottom-right
bind-key j select-pane -D
bind-key C-j select-pane -D
bind-key k select-pane -U
bind-key C-k select-pane -U
bind-key h select-pane -L
bind-key C-h select-pane -L
bind-key l select-pane -R
bind-key C-l select-pane -R
bind-key K swap-pane -U
bind-key J swap-pane -D
bind-key -r < resize-pane -L 1
bind-key -r > resize-pane -R 1
bind-key -r - resize-pane -D 1
bind-key -r + resize-pane -U 1
bind-key -r L next-layout
bind-key -r Space rotate-window
bind-key t choose-tree -wZ
# bind-key G display-popup -E -w90% -h90% -d '#{pane_current_path}' gitui
bind-key G display-popup -E -w90% -h90% -d '#{pane_current_path}' lazygit -ucd ~/.config/lazygit
# bind-key G display-popup -E -w90% -h90% -d '#{pane_current_path}'
bind-key R source ~/.tmux.conf
# tpm
set-option -g @plugin 'tmux-plugins/tpm'
# set-option -g @plugin 'tmux-plugins/tmux-resurrect'
set-option -g @logging_key "L"
set-option -g @plugin 'tmux-plugins/tmux-logging'
# theme
set-option -g @plugin "arcticicestudio/nord-tmux"
run-shell '~/.tmux/plugins/tpm/tpm'
source-file -q ~/.tmux.conf.local