-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.tmux.conf
108 lines (97 loc) · 4.49 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
# plugin
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'joshmedeski/tmux-nerd-font-window-name'
# set -g @plugin 'tmux-plugins/tmux-net-speed'
set -g @plugin 'fcsonline/tmux-thumbs'
run-shell ~/.tmux/plugins/tmux-thumbs/tmux-thumbs.tmux
set -g @thumbs-position off_left
set -g @thumbs-osc52 0 # so you don't get a blank page
set -g @thumbs-command 'tmux set-buffer -w "{}"'
set -g @thumbs-upcase-command 'tmux set-buffer -w "{}" && tmux paste-buffer'
set -g @thumbs-fg-color '#e5e1e9'
set -g @thumbs-bg-color '#434078'
set -g @thumbs-hint-fg-color '#ebb9d0'
set -g @thumbs-hint-bg-color '#434078'
set -g @thumbs-regexp-1 'KEY: \S+\s+([^\s;]+);'
set -g @thumbs-regexp-2 '(\S+\.pdf)'
set-option -g default-shell /usr/bin/fish
# 启用终端标题同步
set -g set-titles on
set -g set-titles-string "#T"
setw -g allow-passthrough on
set -ga update-environment TERM
set -ga update-environment TERM_PROGRAM
# 启用256colors
set -g default-terminal "tmux-256color"
set-option -sa terminal-overrides ",xterm*:Tc"
set-option -sa terminal-features ',xterm-kitty:RGB'
# 从1开始计数
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
# 启动鼠标控制
set -g mouse on
# 启动vi模式
set-window-option -g mode-keys vi
set -sg escape-time 0 # more fluent escape key
set -sg repeat-time 0 # more responsive pane switching
# keymaps
unbind C-b
set -g prefix C-Space
# Visual mode
bind-key -T copy-mode-vi v send-keys -X begin-selection
# bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
# Open panes in current directory
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# Resize panes
bind -n S-Up resize-pane -U 5
bind -n S-Down resize-pane -D 5
bind -n S-Left resize-pane -L 5
bind -n S-Right resize-pane -R 5
# Themes
set-option -g status-position bottom
set -g status-bg '#131318'
set -g status-fg '#e5e1e9'
# 定义颜色
set -g @prefix_highlight_fg '#ebb9d0'
set -g @normal_fg '#c4c0ff'
set -g @cpu_low_fg_color "#[fg=#91d5ad]"
set -g @cpu_medium_fg_color "#[fg=#f5bd6f]"
set -g @cpu_high_fg_color "#[fg=#fbb0d8]"
set -g @gpu_low_fg_color "#[fg=#91d5ad]"
set -g @gpu_medium_fg_color "#[fg=#f5bd6f]"
set -g @gpu_high_fg_color "#[fg=#fbb0d8]"
set -g @ram_low_fg_color "#[fg=#91d5ad]"
set -g @ram_medium_fg_color "#[fg=#f5bd6f]"
set -g @ram_high_fg_color "#[fg=#fbb0d8]"
# 清除现有的 status-left
set-option -g status-left ''
# 状态栏左侧
set -ga status-left "#{?client_prefix,#[fg=#{@prefix_highlight_fg}] ,#[fg=#{@normal_fg}] } #[default]| "
set-option -g status-left-length 0
# 状态栏右侧
set -g @host_short "#(echo #{host} | cut -d'.' -f1)"
set -g status-right '#{cpu_fg_color} #{cpu_percentage} #{ram_fg_color} #{ram_percentage} #{gpu_fg_color} #{gpu_percentage}#[default] -#[fg=#c4c0ff,bold] #{host_short}'
# 窗格颜色
set -g pane-border-style 'fg=#3a383f'
set -g pane-active-border-style 'fg=#c4c0ff'
# 修改窗口
set -g window-status-format ' #[fg=#e5e1e9]#(if [ #{window_index} -eq 1 ]; then echo ""; elif [ #{window_index} -eq 2 ]; then echo ""; elif [ #{window_index} -eq 3 ]; then echo ""; elif [ #{window_index} -eq 4 ]; then echo ""; elif [ #{window_index} -eq 5 ]; then echo ""; elif [ #{window_index} -eq 6 ]; then echo ""; elif [ #{window_index} -eq 7 ]; then echo ""; elif [ #{window_index} -eq 8 ]; then echo ""; elif [ #{window_index} -eq 9 ]; then echo ""; else echo "#{window_index}"; fi) #W'
set -g window-status-current-format ' #[fg=#c4c0ff,bold]#(if [ #{window_index} -eq 1 ]; then echo ""; elif [ #{window_index} -eq 2 ]; then echo ""; elif [ #{window_index} -eq 3 ]; then echo ""; elif [ #{window_index} -eq 4 ]; then echo ""; elif [ #{window_index} -eq 5 ]; then echo ""; elif [ #{window_index} -eq 6 ]; then echo ""; elif [ #{window_index} -eq 7 ]; then echo ""; elif [ #{window_index} -eq 8 ]; then echo ""; elif [ #{window_index} -eq 9 ]; then echo ""; else echo "#{window_index}"; fi) #W'
# pane
setw -g pane-border-status bottom
setw -g pane-border-format ""
setw -g pane-border-lines single
# 命令行和消息
set -g message-command-style 'bg=#131318,fg=#e5e1e9'
set -g message-style 'bg=#131318,fg=#e5e1e9'
# 复制模式
set -g mode-style 'bg=#434078,fg=#e5e1e9'
# 启动tpm
run '~/.tmux/plugins/tpm/tpm'