-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtmux.conf
More file actions
295 lines (232 loc) · 14.5 KB
/
tmux.conf
File metadata and controls
295 lines (232 loc) · 14.5 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
# ┃ ⚡ tmux.conf — SilkCircuit Neon ⚡ ┃
# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
# ─────────────────────────────────────────────────────────────────────────────
# Terminal & True Color
# ─────────────────────────────────────────────────────────────────────────────
set -g default-terminal "tmux-256color"
# True color support (tmux 3.2+ terminal-features method)
set -as terminal-features ",xterm-256color:RGB"
set -as terminal-features ",xterm-ghostty:RGB"
# Undercurl support (neovim diagnostics, spelling, etc.)
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
# ─────────────────────────────────────────────────────────────────────────────
# General
# ─────────────────────────────────────────────────────────────────────────────
set -g mouse on
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
set -g history-limit 50000
# Zero escape delay (critical for vim/neovim)
set -sg escape-time 0
# Vim autoread, tmux-yank, and other integrations need this
set -g focus-events on
# OSC 52 clipboard (system clipboard without external tools)
set -g set-clipboard on
# Allow passthrough sequences (sixel/kitty image protocols)
set -g allow-passthrough on
# Extended key reporting (tmux 3.5+ — proper modifier keys)
set -g extended-keys on
# Longer display time for messages and pane indicators
set -g display-time 3000
set -g display-panes-time 2000
# Auto-rename windows based on running command / current path
setw -g automatic-rename on
set -g automatic-rename-format '#{?#{==:#{pane_current_command},zsh},#{b:pane_current_path},#{pane_current_command}}'
# Activity monitoring (highlight without message spam)
setw -g monitor-activity on
set -g visual-activity off
# ─────────────────────────────────────────────────────────────────────────────
# Vi Mode
# ─────────────────────────────────────────────────────────────────────────────
setw -g mode-keys vi
# Vi-style copy bindings
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
# Don't exit copy mode on mouse drag end (keeps selection visible)
unbind -T copy-mode-vi MouseDragEnd1Pane
# Incremental search in copy mode
bind-key -T copy-mode-vi / command-prompt -i -p "(search down)" "send -X search-forward-incremental \"%%%\""
bind-key -T copy-mode-vi ? command-prompt -i -p "(search up)" "send -X search-backward-incremental \"%%%\""
# ─────────────────────────────────────────────────────────────────────────────
# Splits & Windows (preserve current path)
# ─────────────────────────────────────────────────────────────────────────────
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind _ split-window -fv -c "#{pane_current_path}" # full-width horizontal
bind \\ split-window -fh -c "#{pane_current_path}" # full-width vertical
unbind '"'
unbind %
# New window inherits current path
bind c new-window -c "#{pane_current_path}"
# ─────────────────────────────────────────────────────────────────────────────
# Pane Navigation & Resizing
# ─────────────────────────────────────────────────────────────────────────────
# Vim-style pane selection (prefix + h/j/k/l)
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Vim-style pane resizing (repeatable with -r)
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# Zoom toggle (built-in prefix + z, but also add a mnemonic)
bind m resize-pane -Z
# ─────────────────────────────────────────────────────────────────────────────
# Window Navigation
# ─────────────────────────────────────────────────────────────────────────────
# Direct window selection (Alt + number, no prefix needed)
bind -n M-1 select-window -t 1
bind -n M-2 select-window -t 2
bind -n M-3 select-window -t 3
bind -n M-4 select-window -t 4
bind -n M-5 select-window -t 5
bind -n M-6 select-window -t 6
bind -n M-7 select-window -t 7
bind -n M-8 select-window -t 8
bind -n M-9 select-window -t 9
# Cycle windows (Shift + arrow, no prefix)
bind -n S-Left previous-window
bind -n S-Right next-window
# Swap window position
bind -r < swap-window -d -t -1
bind -r > swap-window -d -t +1
# Quick toggles
bind Tab last-window
# ─────────────────────────────────────────────────────────────────────────────
# Session Management
# ─────────────────────────────────────────────────────────────────────────────
# Toggle last session
bind BTab switch-client -l
# Create new session
bind N command-prompt -p "New session:" "new-session -s '%%'"
# FZF session switcher (prefix + f)
bind f display-popup -E -w 60% -h 60% "\
tmux list-sessions -F '#{session_name}' | \
fzf --reverse --header='⚡ Switch Session' \
--preview='tmux capture-pane -ep -t {}' \
--preview-window=right:60% \
--color=bg+:#3c3836,bg:#0d0d1a,spinner:#e135ff,hl:#80ffea \
--color=fg:#e8e0f0,header:#80ffea,info:#f1fa8c,pointer:#e135ff \
--color=marker:#50fa7b,fg+:#e8e0f0,prompt:#e135ff,hl+:#ff6ac1 \
--color=border:#625c7a | \
xargs tmux switch-client -t"
# ─────────────────────────────────────────────────────────────────────────────
# Popups & Utilities
# ─────────────────────────────────────────────────────────────────────────────
# Popup terminal (prefix + `)
bind ` display-popup -E -w 80% -h 80% -d "#{pane_current_path}"
# Popup process viewer
bind M display-popup -E -w 80% -h 80% "htop"
# Reload config
bind r source-file ~/.tmux.conf \; display-message "⚡ Config reloaded!"
# Break pane out to its own window
bind B break-pane
# Grab a pane from another window into this one
bind G command-prompt -p "Grab pane from:" "join-pane -s '%%'"
# Toggle synchronized input across all panes
bind S setw synchronize-panes \; display-message "#{?pane_synchronized,Sync ON,Sync OFF}"
# ─────────────────────────────────────────────────────────────────────────────
# SilkCircuit Neon — Status Bar
# ─────────────────────────────────────────────────────────────────────────────
#
# Canonical palette:
# #e135ff Electric Purple accents, markers, active elements
# #80ffea Neon Cyan paths, interactions, secondary info
# #ff6ac1 Coral current/hot items, highlights
# #f1fa8c Electric Yellow timestamps, warnings, attention
# #50fa7b Success Green confirmations, success states
# #ff6363 Error Red alerts, failures
# #0d0d1a Deep Void terminal background
# #16162a Dark Surface status bar background
# #e8e0f0 Soft Lavender primary foreground
# #5a5478 Muted dim/inactive text
# #625c7a Dim Purple borders, separators
set -g status on
set -g status-position top
set -g status-interval 5
set -g status-justify left
set -g status-style "bg=#16162a,fg=#e8e0f0"
set -g status-left-length 40
set -g status-right-length 80
# Left: session name (electric purple powerline segment)
set -g status-left "#[fg=#0d0d1a,bg=#e135ff,bold] ⚡#S #[fg=#e135ff,bg=#16162a,nobold] "
# Window list
set -g window-status-format "#[fg=#5a5478] #I:#W "
set -g window-status-current-format "#[fg=#ff6ac1,bg=#16162a]#[fg=#0d0d1a,bg=#ff6ac1,bold] #I:#W#{?window_zoomed_flag,+,} #[fg=#ff6ac1,bg=#16162a]"
set -g window-status-separator ""
set -g window-status-activity-style "fg=#f1fa8c"
set -g window-status-bell-style "fg=#ff6363,bold"
# Right: hostname, time, date
set -g status-right "#[fg=#80ffea] #h #[fg=#625c7a]│#[fg=#f1fa8c] %H:%M #[fg=#625c7a]│#[fg=#5a5478] %m-%d "
# ─────────────────────────────────────────────────────────────────────────────
# SilkCircuit Neon — Panes, Messages, Copy Mode
# ─────────────────────────────────────────────────────────────────────────────
# Pane borders
set -g pane-border-style "fg=#625c7a"
set -g pane-active-border-style "fg=#e135ff"
set -g pane-border-lines single
set -g pane-border-indicators colour
# Messages
set -g message-style "bg=#1e1e35,fg=#ff6ac1,bold"
set -g message-command-style "bg=#1e1e35,fg=#80ffea"
# Copy mode highlight
setw -g mode-style "bg=#e135ff,fg=#0d0d1a"
# Clock
setw -g clock-mode-colour "#e135ff"
setw -g clock-mode-style 24
# Display-panes overlay
set -g display-panes-active-colour "#e135ff"
set -g display-panes-colour "#625c7a"
# ─────────────────────────────────────────────────────────────────────────────
# Plugins
# ─────────────────────────────────────────────────────────────────────────────
# Plugin Manager
set -g @plugin 'tmux-plugins/tpm'
# Sensible defaults everyone agrees on
set -g @plugin 'tmux-plugins/tmux-sensible'
# ─── Session Persistence ───
# Survive tmux server restarts and system reboots
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-strategy-nvim 'no' # Let Neovim handle its own sessions
# ─── System Clipboard ───
# Handles pbcopy (macOS), xclip/wl-copy (Linux), clip.exe (WSL)
set -g @plugin 'tmux-plugins/tmux-yank'
# ─── Seamless Vim/Tmux Navigation ───
# Ctrl-h/j/k/l moves between vim splits AND tmux panes
# NOTE: Install the matching neovim plugin: christoomey/vim-tmux-navigator
# (prefix + C-l sends C-l through for shell clear)
set -g @plugin 'christoomey/vim-tmux-navigator'
# ─── Fuzzy Finder Integration ───
# prefix + F → fuzzy find sessions, windows, panes, commands
set -g @plugin 'sainnhe/tmux-fzf'
TMUX_FZF_LAUNCH_KEY="F"
TMUX_FZF_OPTIONS="\
--color=bg+:#3c3836,bg:#0d0d1a,spinner:#e135ff,hl:#80ffea \
--color=fg:#e8e0f0,header:#80ffea,info:#f1fa8c,pointer:#e135ff \
--color=marker:#50fa7b,fg+:#e8e0f0,prompt:#e135ff,hl+:#ff6ac1 \
--color=border:#625c7a"
# ─── Quick Copy Hints ───
# prefix + Space → Vimium-style hints for copying visible text
set -g @plugin 'fcsonline/tmux-thumbs'
set -g @thumbs-fg-color "#e135ff"
set -g @thumbs-bg-color "#16162a"
set -g @thumbs-hint-fg-color "#0d0d1a"
set -g @thumbs-hint-bg-color "#80ffea"
set -g @thumbs-select-fg-color "#0d0d1a"
set -g @thumbs-select-bg-color "#50fa7b"
# ─── Open URLs & Files from Copy Mode ───
# In copy mode: o → open selection, Ctrl-o → open in $EDITOR
set -g @plugin 'tmux-plugins/tmux-open'
# ─────────────────────────────────────────────────────────────────────────────
# Initialize TPM (MUST be last line)
# ─────────────────────────────────────────────────────────────────────────────
run '~/.tmux/plugins/tpm/tpm'