-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.tmux.conf
98 lines (83 loc) · 3.34 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
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'nocode99/tmux-vpn-status'
# Set prefix key to Ctrl + p
unbind-key C-b
set-option -g prefix C-p
set -g @prefix_highlight_fg 'colour255' # default is 'colour231'
set -g @prefix_highlight_bg 'colour241' # default is 'colour04'
set -g mouse on
set -g default-shell /usr/bin/zsh
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*: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
# Start window and pane indices at 1.
set -g base-index 1
set -g pane-base-index 0
# Split on current working directory
bind c new-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
# Set keybind
bind -r k select-pane -U
bind -r j select-pane -D
bind -r h select-pane -L
bind -r l select-pane -R
bind q killp
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi V send -X select-line
bind-key -T copy-mode-vi y send -X copy-pipe "wl-copy"
bind J resize-pane -D 5
bind K resize-pane -U 5
bind-key C-o last-window
bind-key r command-prompt -I "#W" "rename-window '%%'"
# --> Catppuccin
thm_bg="#1e1e28"
thm_fg="#dadae8"
thm_fg_text=#cdd6f4""
thm_cyan="#c2e7f0"
thm_black="#15121c"
thm_gray="#313244"
thm_magenta="#c6aae8"
thm_pink="#e5b4e2"
thm_red="#e38c8f"
thm_green="#b1e3ad"
thm_yellow="#ebddaa"
thm_blue="#89b4fa"
thm_orange="#f9c096"
thm_black4="#575268"
thm_sapphire="#74c7ec"
# Themes
set -g status-justify "left"
set -g status-left-length "100"
set -g status "on"
set -g status-right-length "160"
set -g status-right-style none
set -g message-style bg=colour2,fg=colour0
set -g status-style none
set -g pane-border-style bg=default
set -g pane-active-border-style bg=default,fg=colour40
set -g pane-border-style fg=colour240
set -g status-left-style none
set -g @prefix_highlight_fg 'thm_fg'
set -g @prefix_highlight_bg 'thm_bg'
set -g @prefix_highlight_output_prefix '<'
set -g @prefix_highlight_output_suffix '>'
setw -g window-status-style bg=default,fg=colour241,none
setw -g window-status-current-style bg=default,bold,fg=$thm_blue
setw -g window-status-activity-style fg=colour2,none
setw -g window-status-separator ""
set -g status-left "#[bg=$thm_sapphire, fg=$thm_bg] #S "
set -g status-right " #{prefix_highlight} #{vpn_status} #[bg=$thm_gray,fg=$thm_fg] #(cat /proc/sys/kernel/hostname) #[bg=$thm_fg, fg=$thm_bg] #(echo $USER) #[bg=$thm_fg, fg=$thm_bg, bold]高"
setw -g window-status-format "#[fg=colour242,nobold,nounderscore,noitalics] #[fg=colour242] #I #W #[fg=colour0,nobold,nounderscore,noitalics]"
setw -g window-status-current-format "#[fg=colour0,nobold,nounderscore,noitalicss] #[fg=colour254] #I #W #[fg=colour0,nobold,nounderscore,noitalics]"
# Install TMUX plugin manager if not exist
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'