-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtmux.conf
More file actions
135 lines (111 loc) · 3.84 KB
/
tmux.conf
File metadata and controls
135 lines (111 loc) · 3.84 KB
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# Configuration
# improve colors
set -g default-terminal "tmux-256color"
set -as terminal-overrides ",xterm-256color:RGB"
# setw -g utf8 on
# set -g status-utf8 on
set -g history-limit 5000
setw -g mode-keys vi
setw -g mouse off
set -sg escape-time 1
set -g repeat-time 1000
set-option -g base-index 1
set-option -g focus-events on
set-option -sa terminal-overrides ',XXX:RGB'
set-window-option -g pane-base-index 1
set -g renumber-windows on
# Activity monitoring
# set -g window-status-activity-style 'fg=colour247,blink'
setw -g monitor-activity on
set -g bell-action none
set -g visual-bell off
set -g visual-activity off
set -g visual-silence off
# Key Bindings
unbind-key C-b
set -g prefix C-a
bind-key C-a send-prefix
# Clear screen
bind-key C-l send-keys "clear && tmux clear-history" \; send-keys "Enter"
# bind -n C-k clear-history
# bind-key C-l send-keys -R \; clear-history \; send-keys "Enter"
# unbind clock-mode
unbind-key t
# Copy and paste like in vim
unbind-key [
bind-key tab copy-mode
# bind-key -n ^v copy-mode
# bind-key C-A send-prefix
# bind-key -t vi-copy v begin-selection
# bind-key -t vi-copy y copy-selection
# Tab to toggle copy-mode (enter/exit)
bind-key -T copy-mode-vi Tab send-keys -X cancel
unbind-key -T copy-mode-vi q
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection
unbind-key p
bind-key p paste-buffer
# sessions
bind-key ^ switch-client -l
bind-key c-s choose-tree
# split windows like vim. - Note: vim's definition of a horizontal/vertical split is reversed from tmux's
unbind-key '"'
unbind-key %
# unbind-key s
bind-key s split-window -v -c "#{pane_current_path}"
bind-key S split-window -v -l 40 -c "#{pane_current_path}"
bind-key v split-window -h -c "#{pane_current_path}"
bind-key V split-window -h -l 120 -c "#{pane_current_path}"
unbind-key n
bind-key c-n next-window
bind-key c-p previous-window
# navigate panes with hjkl
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# unbind-key ';'
bind-key p last-pane
bind-key -r H resize-pane -L 10
bind-key -r J resize-pane -D 10
bind-key -r K resize-pane -U 10
bind-key -r L resize-pane -R 10
bind-key -r D swap-pane -D
bind-key -r U swap-pane -U
unbind-key r
bind-key r source-file ~/.tmux.conf \; display "Configuration Reloaded!"
bind-key c-q killp
# unbind-key d
# bind-key ^d detach-client
# Local config for osx
if-shell 'test "$(uname)" = "Darwin"' 'source ~/.tmux-osx.conf'
# Local config
if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local'
# Plugins
# https://github.com/tmux-plugins/tpm
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @open-S 'https://www.google.com/search?q='
set -g @plugin 'fabioluciano/tmux-powerkit'
set -g @powerkit_session_icon ""
set -g @powerkit_status_position "bottom"
set -g @powerkit_elements_spacing "both"
# 主题选项 (50+ 可选):
# tokyo-night, catppuccin, dracula, nord, gruvbox, monokai, onedark,
# rose-pine, kanagawa, everforest, solarized, ayu, github, material,
# night-owl, oceanic-next, synthwave, moonlight, iceberg, hackerman,
# matte-black, ethereal, lagoon, starlight, vesper, snazzy, flexoki...
# 变体: night, day, storm, moon, dark, light, mocha, latte, frappe...
set -g @powerkit_theme "everforest"
set -g @powerkit_theme_variant "dark"
# 分隔符样式: normal, rounded, flame, pixel, honeycomb, none, powerline
set -g @powerkit_separator_style 'flame'
# 边缘分隔符: 同上, 可加 :all 后缀应用到所有边缘
set -g @powerkit_edge_separator_style "flame"
set -g @powerkit_plugins "nowplaying,weather,ping,temperature,volume"
set -g @powerkit_plugin_weather_location "Chengdu"
set -g @powerkit_plugin_weather_format '%t+H:%h+%w'
set -g @powerkit_plugin_ping_host "61.139.2.69"
run '~/.tmux/plugins/tpm/tpm'
# End of Plugins