6 -set -g extended-keys on
7 -set -g extended-keys-format csi-u
11 -set -g history-limit 50000
12 -set -g renumber-windows on
14 -setw -g pane-base-index 1
16 -set -g status-keys vi
17 -set -g escape-time 10
18 -set -g focus-events on
32 +set -g default-command
"nu --login" 34 +# Tell apps inside tmux what terminal capability profile to use.
35 +# tmux-256color is the modern tmux terminfo entry.
36 +set -g default-terminal
"tmux-256color" 38 +# Advertise modern terminal features to apps inside tmux.
40 +# clipboard: OSC52/system clipboard integration.
41 +# extkeys: distinguish more modified keys.
42 +# focus: apps can know terminal focus gained/lost.
43 +# hyperlinks: clickable terminal links.
44 +set -ga terminal-features
",*:RGB,clipboard,ccolour,cstyle,extkeys,focus,hyperlinks,overline,strikethrough,usstyle" 46 +# Let tmux talk to terminal clipboard when possible.
19 47 set -g set-clipboard on
22 -set -g default-terminal
"tmux-256color" 23 -set -as terminal-features
',*:RGB' 49 +# Emit focus events into panes.
50 +# Useful for editors/shells that redraw or save state
on focus change.
51 +set -g focus-events on
25 -##### new panes/windows open where you are
26 -bind
c new-window -c
"#{pane_current_path}" 29 -bind | split-window -h -c
"#{pane_current_path}" 30 -bind - split-window -v -c
"#{pane_current_path}" 53 +# Enable extended key reporting in tmux itself.
54 +set -g extended-keys on
33 -bind r source-file
~/.config/tmux/tmux.conf
\; display-message "tmux config reloaded
" 56 +# Use CSI-u extended key encoding.
57 +# Pi needs this for modified Enter/key chords inside tmux.
58 +set -g extended-keys-format csi-u
35 -##### help: the only shortcut to memorize 36 -bind h display-popup -w 82% -h 82% -k 'sh -c "cat <<EOF
37 -TMUX QUICK HELP press any key to close
60 +# Allow passthrough escape sequences.
61 +# Needed by some terminal protocols/features behind tmux.
62 +set -g allow-passthrough on
64 +# Remove old vi/escape delay.
65 +# Makes modal editors feel instant.
66 +set -sg escape-time 0
43 - tmux new -s work start named session
44 - tmux ls list sessions
45 - tmux attach -t work attach session
68 +# Time window where repeatable bindings can repeat without prefix.
69 +set -g repeat-time 500
50 - Prefix
1..9 jump window
51 - Prefix , rename window
52 - Prefix & kill window
71 +# Scrollback lines per pane.
72 +set -g history-limit 100000
55 - Prefix | split right
57 - Prefix arrows move between panes
74 +# Mouse enables click panes, resize panes, wheel scroll, status clicks.
62 - Prefix [ copy/scroll mode
63 - q leave copy/scroll mode
64 - / search in copy mode
78 +# • tmux copy mode keeps real wheel scrolling.
79 +# • Mouse-aware apps receive real mouse wheel events.
80 +# • Full-screen apps without mouse support receive Up/Down keys.
82 +# Pi list widgets currently understand keyboard navigation better than raw tmux
83 +# wheel events, so this makes the mouse wheel move Pi selections inside tmux.
84 +# Outside full-screen apps, WheelUp still enters tmux copy-mode scrollback.
85 +bind -n WheelUpPane if -F
"#{pane_in_mode}" { send-keys -M } { if -F
"#{mouse_any_flag}" { send-keys -M } { if -F
"#{alternate_on}" { send-keys Up } { copy-mode -e } } }
86 +bind -n WheelDownPane if -F
"#{pane_in_mode}" { send-keys -M } { if -F
"#{mouse_any_flag}" { send-keys -M } { if -F
"#{alternate_on}" { send-keys Down } { send-keys -M } } }
67 - Prefix ? built-in key list
68 - Prefix
: tmux command prompt
69 - man tmux full manual
88 +# Renumber windows after one closes: 1,2,3 not 1,3,7.
89 +set -g renumber-windows on
91 +# Start window numbers at 1, easier keyboard reach than 0.
74 -##### tiny status bar 75 -set -g status-position top 94 +# Start pane numbers at
1 too, consistent with windows.
95 +setw -g pane-base-index 1
97 +# If current session dies, keep client alive if other sessions exist.
98 +set -g detach-on-destroy off
100 +# How long tmux messages stay visible, ms.
101 +set -g display-time 1200
103 +# Refresh status bar every
5 sec.
76 104 set -g status-interval 5
77 -set -g status-style "bg=#11111b,fg=#cdd6f4
" 78 -set -g status-left-length 40 79 -set -g status-left " #[fg=#a6e3a1,bold]#S #[fg=#6c7086]│ #[fg=#89b4fa]C-b h help
" 80 -set -g status-right "#[fg=#6c7086]#(whoami)@#h #[fg=#f5c2e7]%H:%M
" 81 -setw -g window-status-format " #[fg=#6c7086]#I:#W
" 82 -setw -g window-status-current-format " #[fg=#f9e2af,bold]#I:#W
" 83 -setw -g pane-border-style "fg=#313244
" 84 -setw -g pane-active-border-style "fg=#89b4fa
" 106 +# Put status bar at bottom.
107 +set -g status-position bottom
109 +# Window list alignment in status bar.
110 +set -g status-justify left
112 +# Max width of left status segment.
113 +set -g status-left-length 80
115 +# Max width of right status segment.
116 +set -g status-right-length 120
118 +# Mark windows with activity in background panes.
119 +setw -g monitor-activity on
121 +# Do not spam visible activity alerts.
122 +set -g visual-activity off
125 +set -g bell-action none
127 +# Copy mode uses vi keys: h/j/k/l, /, n, v, y style.
128 +setw -g mode-keys vi
130 +# ── Prefix ───────────────────────────────────────────────────────────────────
132 +# Remove tmux
default prefix Ctrl-B.
135 +# Use Ctrl-Space as primary prefix.
136 +# Some terminals encode Ctrl-Space as Ctrl-@ (NUL), so accept both spellings.
137 +set -g prefix C-Space
140 +# Press prefix twice to send literal prefix into app if needed.
141 +bind C-Space send-prefix
142 +bind C-@ send-prefix
144 +# ── Nugu colors ──────────────────────────────────────────────────────────────
146 +# Hidden variables keep repeated colors readable.
147 +# They are not tmux options shown in status;
just local config vars.
148 +%
hidden BG=
"#242424" 149 +%
hidden FG=
"#ededed" 150 +%
hidden ACCENT=
"#d86dd8" 151 +%
hidden MINOR=
"#9d9d9d" 152 +%
hidden DIM_FG=
"#5d5d5d" 153 +%
hidden DIM_BG=
"#050505" 154 +%
hidden FOCUS=
"#9aabae" 155 +%
hidden WARN=
"#9e9a69" 156 +%
hidden ERROR=
"#e46479" 161 +set -g status-style
"bg=$BG,fg=$FG" 163 +# Popup message style: display-message, errors, confirmations.
164 +set -g message-style
"bg=$ACCENT,fg=$BG,bold" 166 +# Command prompt style: command-prompt, rename prompts, etc.
167 +set -g message-command-style
"bg=$FOCUS,fg=$BG,bold" 169 +# Copy-mode selection/current-match style.
170 +set -g mode-style
"bg=$ACCENT,fg=$BG,bold" 172 +# Inactive pane content is dimmed.
173 +# Hard limit: tmux can only style terminal *default* fg/bg.
174 +# Full-screen TUIs/editors that paint explicit ANSI colors cannot
be truly dimmed.
175 +# For normal shell output, this is aggressive: dim attr + grey fg + near-black bg.
176 +set -g window-style
"fg=$DIM_FG,bg=$DIM_BG,dim" 178 +# Active pane content uses strong Nugu defaults.
179 +set -g window-active-style
"fg=$FG,bg=$BG" 181 +# Inactive pane border.
182 +set -g pane-border-style
"fg=$DIM_FG,bg=$DIM_BG,dim" 184 +# Active pane border.
185 +# Bold magenta is intentionally loud: active pane must
be obvious.
186 +set -g pane-active-border-style
"fg=$ACCENT,bg=$BG,bold" 188 +# Heavy borders make pane geometry visible at
a glance.
189 +set -g pane-border-lines heavy
191 +# Active border indicators: colour + arrows.
192 +set -g pane-border-indicators both
194 +# Show
a label in each pane border.
195 +# Active pane gets
a loud block badge;
inactive panes are deliberately quiet.
196 +set -g pane-border-status top
197 +# Note: #[] style commas inside tmux conditionals must
be escaped as #,.
198 +set -g pane-border-format
"#{?pane_active,#[fg=$BG#,bg=$ACCENT#,bold] █ ACTIVE #P █ #[fg=$ACCENT#,bg=$BG],#[fg=$DIM_FG#,bg=$DIM_BG#,dim] #P }" 200 +# Colors used by Prefix+q display-panes overlay.
201 +set -g display-panes-colour
"$MINOR" 202 +set -g display-panes-active-colour
"$ACCENT" 204 +# Popup body colors.
205 +set -g popup-style
"bg=$BG,fg=$FG" 207 +# Popup border color.
208 +set -g popup-border-style
"fg=$ACCENT" 210 +# Rounded popup borders.
211 +set -g popup-border-lines rounded
213 +# Left status: session name.
214 +# #[] changes style until next style marker.
215 +# #S is current session name.
216 +# is Powerline separator.
217 +set -g status-left
"#[fg=$BG,bg=$ACCENT,bold] #S #[fg=$ACCENT,bg=$BG] " 220 +# #{?client_prefix,A,B} is tmux conditional.
221 +# Shows PREFIX warning only while prefix is armed.
222 +# #{user} is current user. #{host_short} is hostname. %H:%M is time.
223 +# Also shows PREFIX while prefix is armed and pane/resize while in key tables.
224 +set -g status-right
"#{?client_prefix,#[fg=$BG#,bg=$WARN#,bold] PREFIX #[fg=$WARN#,bg=$BG] ,}#{?#{!=:#{client_key_table},root},#[fg=$BG#,bg=$ACCENT#,bold] #{client_key_table} #[fg=$ACCENT#,bg=$BG] ,}#[fg=$MINOR]#{user}@#{host_short} #[fg=$ACCENT]%H:%M" 226 +# No separator between window items;
each item owns its spacing.
227 +setw -g window-status-separator
"" 231 +setw -g window-status-format
"#[fg=$MINOR,bg=$BG] #I:#W#{?window_flags, #F,} " 235 +setw -g window-status-current-format
"#[fg=$BG,bg=$FOCUS,bold] #I:#W#{?window_zoomed_flag, ,} #[fg=$FOCUS,bg=$BG]" 240 +bind t new-window -c
"#{pane_current_path}" 243 +bind c new-window -c
"#{pane_current_path}" 254 +bind q display-panes
260 +bind r source-file
~/.config/tmux/tmux.conf
\; display-message "tmux reloaded
" 262 +# Prefix+? opens a native help popup. 263 +# The help file lives beside this config in the dotfiles tmux dir. 264 +bind ? display-popup -E -w 70% -h 80% -d "#{pane_current_path}
" "sh -c
'cat ~/.config/tmux/help.txt; printf \"\\npress enter to close...\"; read _'" 266 +# Prefix+e edits tmux config in a popup. 267 +# Fast loop: edit → save → Prefix+r. 268 +bind e display-popup -E -w 90% -h 90% -d ~/.config/tmux "nvim tmux.conf
" 270 +# Prefix+f toggles pane zoom. 271 +# Zoom means one pane temporarily fills whole window. 272 +bind f resize-pane -Z 274 +# Prefix+g opens a scratch popup shell in current dir. 275 +# Popup exits when shell exits. 276 +bind g display-popup -E -w 90% -h 80% -d "#{pane_current_path}
" "nu --login
" 278 +# Prefix+d opens a project/session switcher. 279 +# Existing sessions and common project dirs go through fzf in a tmux popup. 280 +bind d display-popup -E -w 90% -h 85% -d "#{pane_current_path}
" "~/.config/tmux/session.sh
'#{pane_current_path}'" 282 +# Prefix+F prompts for session name, then creates/attaches it. 283 +# new-session -A = attach if exists, otherwise create. 284 +bind F command-prompt -p "session
" "new-session -A -s
'%%' -c
'#{pane_current_path}'" 286 +# Prefix+v splits current pane left/right. 287 +bind v split-window -h -c "#{pane_current_path}
" 289 +# Prefix+s splits current pane top/bottom. 290 +bind s split-window -v -c "#{pane_current_path}
" 292 +# Prefix+h/j/k/l move between panes, vim style. 293 +# -r means repeatable: Prefix+h, then h/h/h keeps moving for repeat-time ms. 294 +bind -r h select-pane -L 295 +bind -r j select-pane -D 296 +bind -r k select-pane -U 297 +bind -r l select-pane -R 299 +# Prefix+H/J/K/L resize panes in bigger jumps. 300 +bind -r H resize-pane -L 5 301 +bind -r J resize-pane -D 5 302 +bind -r K resize-pane -U 5 303 +bind -r L resize-pane -R 5 305 +# No global Alt-h/j/k/l here. 306 +# Neovim already uses Alt-h/l for parameter swapping in this dotfiles repo. 307 +# Prefix+h/j/k/l keeps tmux vim-like without stealing editor muscle memory. 309 +# Prefix+< moves current window left in window list. 310 +bind < swap-window -t -1\; select-window -t -1 312 +# Prefix+> moves current window right in window list. 313 +bind > swap-window -t +1\; select-window -t +1 315 +# ── Pane key table ─────────────────────────────────────────────────────────── 317 +# Prefix+w enters a transient pane command table. 318 +# Next key is read from table "pane
". 319 +# This mirrors your Ghostty/WezTerm leader+w pane mode. 320 +bind w switch-client -T pane 322 +# pane:h/j/k/l moves between panes. 323 +bind -T pane h select-pane -L 324 +bind -T pane j select-pane -D 325 +bind -T pane k select-pane -U 326 +bind -T pane l select-pane -R 328 +# pane:a shows pane numbers and jumps to selected pane. 329 +bind -T pane a display-panes 331 +# pane:v/s split current pane. 332 +bind -T pane v split-window -h -c "#{pane_current_path}
" 333 +bind -T pane s split-window -v -c "#{pane_current_path}
" 335 +# pane:f zooms/unzooms current pane. 336 +bind -T pane f resize-pane -Z 338 +# pane:q kills current pane. 339 +bind -T pane q kill-pane 341 +# pane:r/R rotates panes inside current window. 342 +bind -T pane r rotate-window -D 343 +bind -T pane R rotate-window -U 345 +# pane:H/L moves current window in window list. 346 +bind -T pane H swap-window -t -1\; select-window -t -1 347 +bind -T pane L swap-window -t +1\; select-window -t +1 349 +# pane:= enters resize table for repeated resize keys. 350 +bind -T pane = switch-client -T resize 352 +# ── Resize key table ───────────────────────────────────────────────────────── 354 +# resize:h/j/k/l shrinks/grows by small jumps. 355 +bind -T resize h resize-pane -L 2 356 +bind -T resize j resize-pane -D 2 357 +bind -T resize k resize-pane -U 2 358 +bind -T resize l resize-pane -R 2 360 +# resize:H/J/K/L resizes by large jumps. 361 +bind -T resize H resize-pane -L 8 362 +bind -T resize J resize-pane -D 8 363 +bind -T resize K resize-pane -U 8 364 +bind -T resize L resize-pane -R 8 366 +# Escape exits resize table. 367 +bind -T resize Escape switch-client -T root 369 +# ── Copy/search ────────────────────────────────────────────────────────────── 371 +# Prefix+/ enters copy mode and starts backward search. 372 +bind / copy-mode \; send -X search-backward 374 +# Prefix+[ enters copy mode. 377 +# Prefix+] pastes latest tmux buffer. 380 +# Prefix+P opens buffer picker. 381 +bind P choose-buffer 383 +# In copy mode: v begins selection. 384 +bind -T copy-mode-vi v send -X begin-selection 386 +# In copy mode: Ctrl-v toggles rectangular/block selection. 387 +bind -T copy-mode-vi C-v send -X rectangle-toggle 389 +# In copy mode: y copies selection to tmux buffer and system clipboard. 390 +# Clipboard tools tried in order: wl-copy, xclip, pbcopy. 391 +bind -T copy-mode-vi y send -X copy-pipe-and-cancel "sh -c
'wl-copy 2>/dev/null || xclip -selection clipboard 2>/dev/null || pbcopy 2>/dev/null || cat >/dev/null'" 393 +# In copy mode: Enter does same as y. 394 +bind -T copy-mode-vi Enter send -X copy-pipe-and-cancel "sh -c
'wl-copy 2>/dev/null || xclip -selection clipboard 2>/dev/null || pbcopy 2>/dev/null || cat >/dev/null'" 396 +# ── Pickers ────────────────────────────────────────────────────────────────── 398 +# Prefix+p opens interactive tree picker, focused on windows. 399 +# -Z zooms preview while choosing. 401 +bind p choose-tree -Zw 403 +# Prefix+Tab opens interactive tree picker, focused on sessions. 404 +bind Tab choose-tree -Zs 406 +# ── Direct window jumps ────────────────────────────────────────────────────── 408 +# Prefix+number jumps to window number. 409 +bind 1 select-window -t :=1 410 +bind 2 select-window -t :=2 411 +bind 3 select-window -t :=3 412 +bind 4 select-window -t :=4 413 +bind 5 select-window -t :=5 414 +bind 6 select-window -t :=6 415 +bind 7 select-window -t :=7 416 +bind 8 select-window -t :=8 417 +bind 9 select-window -t :=9