-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
85 lines (64 loc) · 3.05 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
setw -g mode-keys vi
setw -g base-index 1
setw -g pane-base-index 1
setw -g aggressive-resize off
set -g status on
set -g status-position top
set -g escape-time 10
set -g prefix C-a
set -g focus-events on
set -g mouse on
set -g renumber-windows on
set -s set-clipboard on
set -g update-environment "SSH_AUTH_SOCK SSH_CLIENT SSH_CONNECTION DISPLAY"
set -g default-terminal 'tmux-256color'
set-option -a terminal-features 'xterm-256color:RGB'
# set -g terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
# set -as terminal-overrides ',xterm-256color:RGB'
# undercurl support
# set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
# underscore colours - needs tmux-3.0
# set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
set -g @continuum-restore 'on'
set -g @tmux-weather-location "Chicago"
setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock
unbind x; bind x kill-pane
unbind r; bind r source-file ~/.tmux.conf\; display "config reloaded!"
unbind K; bind K send-keys -R\; clear-history\; send-keys Enter\;
unbind m; bind m set status\;
unbind '"'
unbind %
unbind c
bind a setw synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c command-prompt -p "window name: " "new-window -c \"#{pane_current_path}\" -n '%%'"
bind -r k resize-pane -U 5
bind -r j resize-pane -D 5
bind -r h resize-pane -L 5
bind -r l resize-pane -R 5
bind -nr C-S-Left swap-window -t -1\; previous-window
bind -nr C-S-Right swap-window -t +1\; next-window
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
is_osx="uname | grep -q Darwin"
if-shell "$is_osx" "set-option -as terminal-features \",alacritty:RGB\"" "set-option -as terminal-features \",tmux-256color:RGB\""
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 -T copy-mode-vi C-h select-pane -L
bind -T copy-mode-vi C-j select-pane -D
bind -T copy-mode-vi C-k select-pane -U
bind -T copy-mode-vi C-l select-pane -R
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y if-shell "$is_osx" "send-keys -X copy-pipe-and-cancel 'pbcopy'" "send-keys -X copy-pipe-and-cancel 'xclip -selection clipboard -i'"
bind -T copy-mode-vi r send-keys -X rectangle-toggle
if-shell "test -n -f ~/.tmux/plugin/tpm" "git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm"
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-yank/yank.tmux'
# set -g @plugin 'tmux-resurrect/resurrect.tmux'
# set -g @plugin 'tmux-continuum/continuum.tmux'
# set -g @plugin 'olimorris/tmux-pomodoro-plus'
if-shell "test -f ~/.tmuxline.conf" "source ~/.tmuxline.conf"
run '~/.tmux/plugins/tpm/tpm'