-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
96 lines (77 loc) · 4.01 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
# --------------------------------------------------- general -----------------------------------------------------------
set-option -g escape-time 50
set-option -g default-shell /bin/zsh
set-option -g mouse on
set -g history-limit 20000
set -g display-panes-time 4000
set-option -g set-titles on
set -g set-titles-string '#S:#I:#W - "#T" #{session_alerts}#{?pane_pipe,(piped),}'
set-window-option -g automatic-rename on
set-option -g automatic-rename-format '#(basename "#{pane_current_path}")[#{pane_current_command}]'
set -s set-clipboard on
# # --------------------------------------------------- prefix -----------------------------------------------------------
set -g prefix C-a
# 从tmux v1.6版起,支持设置第二个指令前缀
# set-option -g prefix2 C-a # 设置一个不常用的`键作为指令前缀,按键更快些
# # --------------------------------------------------- pane -----------------------------------------------------------
bind - splitw -v -c '#{pane_current_path}' # 垂直方向新增面板,默认进入当前目录
bind = splitw -h -c '#{pane_current_path}' # 水平方向新增面板,默认进入当前目录
bind -n M-n splitw -h -c '#{pane_current_path}' \; select-layout tiled # 垂直方向新增面板,平铺布局
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-h select-pane -L
bind -n M-l select-pane -R
# # --------------------------------------------------- plugins ----------------------------------------------------
# 将下面内容复制到`~/.tmux.conf`
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-urlview'
set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @plugin 'tmux-plugins/tmux-logging'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-sessionist'
set -g @plugin 'tmux-plugins/tmux-cowboy'
# set -g @plugin "arcticicestudio/nord-tmux"
# set -g @plugin 'jimeh/tmux-themepack'
# theme dracula
set -g @plugin 'dracula/tmux'
set -g @dracula-show-flags true
set -g @dracula-show-powerline true
set -g @dracula-border-contrast true
set -g @dracula-show-left-icon session
set -g @dracula-cpu-display-load false
set -g @dracula-ram-usage-label "💾"
set -g @dracula-cpu-usage-label "🚀"
set -g @dracula-ram-usage-colors "green dark_gray"
set -g @dracula-network-bandwidth eth0
set -g @dracula-network-bandwidth-interval 1
set -g @dracula-ping-server "baidu.com"
set -g @dracula-ping-rate 10
# set -g @dracula-network-bandwidth-show-interface true
# NOTE: available plugins: battery, cpu-usage, git, gpu-usage, ram-usage, network, network-bandwidth, network-ping, attached-clients, network-vpn, weather, time, spotify-tui, kubernetes-context
# NOTE: network-bandwidth need bc command in PATH
set -g @dracula-plugins "network network-ping cpu-usage ram-usage"
set -g @plugin 'laktak/extrakto'
set -g @plugin 'jaclu/tmux-menus'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# ---- copy mode overwrite
setw -g mode-keys vi
bind -T copy-mode MouseDragEnd1Pane send -X copy-selection
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection
bind-key -T copy-mode-vi u send-keys -X halfpage-up
bind-key -T copy-mode-vi d send-keys -X halfpage-down
bind-key -T copy-mode-vi 'v' send -X begin-selection # Begin selection in copy mode.
bind-key -T copy-mode-vi 'C-v' send -X rectangle-toggle # Begin selection in copy mode.
bind-key -T copy-mode-vi 'y' send -X copy-selection # Yank selection in copy mode.
# set -g default-terminal "screen-256color"
# set -g default-terminal "xterm-256color"
set -g default-terminal "${TERM}"
# Enable RGB colour if running in xterm(1)
# set-option -sa terminal-overrides ",xterm*:Tc"
# Undercurl
# set -as terminal-overrides ',vte*:Smulx=\E[4\:%p1%dm'
# 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