-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf
124 lines (84 loc) · 3.71 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
source ~/.tmux.theme
unbind C-b
set -g prefix C-Space
bind Space send-prefix
set-option -g default-shell /opt/homebrew/bin/zsh
set -gw mode-keys vi
set -g status-keys emacs
set -g mouse on
set-option -s set-clipboard off
set -ga terminal-features ",*:hyperlinks"
bind-key -r Space next-layout
bind-key 'v' copy-mode
# Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi 'v' send -X begin-selection
# bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi 'y' send -X copy-pipe "pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe "pbcopy"
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
# bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "pbcopy"
bind-key r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n 'C-\' if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
bind-key -n M-h if-shell "$is_vim" 'send-keys M-h' 'resize-pane -L 3'
bind-key -n M-j if-shell "$is_vim" 'send-keys M-j' 'resize-pane -D 3'
bind-key -n M-k if-shell "$is_vim" 'send-keys M-k' 'resize-pane -U 3'
bind-key -n M-l if-shell "$is_vim" 'send-keys M-l' 'resize-pane -R 3'
bind-key -n 'C-\' if-shell "$is_vim" 'send-keys C-\\\\' 'select-pane -l'
bind-key -T copy-mode-vi 'C-h' select-pane -L
bind-key -T copy-mode-vi 'C-j' select-pane -D
bind-key -T copy-mode-vi 'C-k' select-pane -U
bind-key -T copy-mode-vi 'C-l' select-pane -R
bind-key -T copy-mode-vi 'C-\' select-pane -l
bind j split-window -v
bind C-j split-window -v
bind l split-window -h
bind C-l split-window -h
bind g select-window -T -t lazygit
bind C-g select-window -T -t lazygit
bind h split-window -h "gitsh --git $(which hub)"
bind C-h split-window -h "gitsh --git $(which hub)"
bind-key x kill-pane
bind-key C-x kill-pane
bind-key m choose-window 'join-pane -h -t "%%"'
bind-key m choose-window "join-pane -s '%%'"
# clear buffer
bind C-r send-keys 'C-l'
set -sg escape-time 0
set -g history-limit 10000
setw -g monitor-activity on
set -g visual-activity off
setw -g window-status-activity none
set -g base-index 1
setw -g pane-base-index 1
set -g status-left-length 100
set -g set-titles on
set-option -g set-titles-string '#S.#I.#P #W' # window number,program name, active(or not)
set-option -g default-terminal "xterm-kitty"
set-option -ga terminal-overrides ",xterm-kitty:Tc"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
setw -g aggressive-resize on
set-option -g allow-rename off
set-option -g repeat-time 400
set-option -g xterm-keys on
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'nhdaly/tmux-scroll-copy-mode'
# set -g @plugin 'tmux-plugins/tmux-battery'
# set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'Morantron/tmux-fingers'
# set -g @plugin "arcticicestudio/nord-tmux"
# set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @fingers-copy-command 'pbcopy'
set -g @fingers-copy-command-uppercase 'xargs open'
set-option -g display-time 4000
set -g focus-events on
run '~/.tmux/plugins/tpm/tpm'