-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
108 lines (76 loc) · 3.58 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
set-option -g default-terminal "screen-256color"
set-option -gas terminal-overrides "*:Tc" # true color support
set-option -gas terminal-overrides "*:RGB" # true color support
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
set-option -g focus-events on
# larger history scrollback
set -g history-limit 20000
# command prefix
set -g prefix C-a
bind-key a send-prefix
bind-key C-a last-window
# start window numbers at 1 to match keyboard order with tmux window order
set -g base-index 1
setw -g pane-base-index 1
# renumber windows sequentially after closing any of them
set -g renumber-windows on
# provide access to the clipboard for pbpaste, pbcopy
setw -g automatic-rename on
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-pipe "reattach-to-user-namespace pbcopy"
set -g mouse on
bind -T copy-mode C-WheelUpPane send -X halfpage-up
bind -T copy-mode C-WheelDownPane send -X halfpage-down
# act like vim
setw -g mode-keys vi
bind-key v split-window -h -c "#{pane_current_path}"
bind-key s split-window -v -c "#{pane_current_path}"
bind-key -r J resize-pane -D 5
bind-key -r K resize-pane -U 5
bind-key -r H resize-pane -L 5
bind-key -r L resize-pane -R 5
bind-key b send-keys -R \; clear-history
# smart pane switching with awareness of vim splits
isVim="tmux display -p '#{pane_current_command} #T' | grep -iqE '(vim|VIM)'"
bind -n C-j if-shell "$isVim" "send C-j" "select-pane -D"
bind -n C-k if-shell "$isVim" "send C-k" "select-pane -U"
bind -n C-h if-shell "$isVim" "send C-h" "select-pane -L"
bind -n C-l if-shell "$isVim" "send C-l" "select-pane -R"
bind '"' split-window -c '#{pane_current_path}'
bind % split-window -h -c '#{pane_current_path}'
bind c new-window -c '#{pane_current_path}'
bind m next-window
bind n previous-window
set -g base-index 1
set -g pane-base-index 1
bind r source-file ~/.tmux.conf \; display 'Reloaded tmux config file.'
set -s escape-time 0
# Allow the arrow key to be used immediately after changing windows
set-option -g repeat-time 0
set -g status-interval 60
set -g mode-style "fg=#7aa2f7,bg=#3b4261"
set -g message-style "fg=#7aa2f7,bg=#3b4261"
set -g message-command-style "fg=#7aa2f7,bg=#3b4261"
set -g pane-border-style "fg=#3b4261"
set -g pane-active-border-style "fg=#7aa2f7,bg=#7aa2f7"
set -g status "on"
set -g status-justify "left"
set -g status-style "fg=#7aa2f7,bg=#16161e"
set -g status-left-length "100"
set -g status-right-length "100"
set -g status-left-style NONE
set -g status-right-style NONE
set -g status-left "#[fg=#15161e,bg=#7aa2f7,bold] ❒ #S #[fg=#7aa2f7,bg=#16161e,nobold,nounderscore,noitalics]"
set -g status-right "#[fg=white,bg=#16161e,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#16161e] #{prefix_highlight} #[fg=white,bg=#16161e,nobold,nounderscore,noitalics]#[fg=white,bg=#3b4261] %Y-%m-%d | %I:%M %p #[fg=#7aa2f7,bg=#3b4261,nobold,nounderscore,noitalics]"
setw -g window-status-activity-style "underscore,fg=#a9b1d6,bg=#16161e"
setw -g window-status-separator ""
setw -g window-status-style "NONE,fg=#a9b1d6,bg=#16161e"
setw -g window-status-format "#[fg=brightwhite,bg=#16161e,nobold,noitalics,nounderscore] #I #W "
setw -g window-status-current-format "#[fg=white,bg=#1F2335] #I #W "
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'nhdaly/tmux-scroll-copy-mode'
run '~/.tmux/plugins/tpm/tpm'