|
@@ -17,14 +17,19 @@ set -g status-left ' '
|
|
|
# prefix-highlight (native #{client_prefix} — no plugin needed) + copy/sync indicators.
|
|
# prefix-highlight (native #{client_prefix} — no plugin needed) + copy/sync indicators.
|
|
|
# Indicators prepend to status-right so [+] [d] stay flush-right (mouse math intact).
|
|
# Indicators prepend to status-right so [+] [d] stay flush-right (mouse math intact).
|
|
|
set -g status-right '#{?client_prefix,#[bg=colour3#,fg=colour235#,bold] ^B #[default] ,}#{?#{==:#{pane_mode},copy-mode},#[bg=colour2#,fg=colour235#,bold] COPY #[default] ,}#{?pane_synchronized,#[bg=colour1#,fg=colour15#,bold] SYNC #[default] ,} [+] [d] '
|
|
set -g status-right '#{?client_prefix,#[bg=colour3#,fg=colour235#,bold] ^B #[default] ,}#{?#{==:#{pane_mode},copy-mode},#[bg=colour2#,fg=colour235#,bold] COPY #[default] ,}#{?pane_synchronized,#[bg=colour1#,fg=colour15#,bold] SYNC #[default] ,} [+] [d] '
|
|
|
-# Tab label = the app's pane title (Claude Code sets a good one), trimmed to 24;
|
|
|
|
|
|
|
+# Tab label = the app's pane title (Claude Code sets a good one);
|
|
|
# falls back to the running command for bare shells (where pane_title == hostname).
|
|
# falls back to the running command for bare shells (where pane_title == hostname).
|
|
|
# #{E:...} forces the stored format in @wtitle to expand. Replaces #W to dodge the
|
|
# #{E:...} forces the stored format in @wtitle to expand. Replaces #W to dodge the
|
|
|
# window-name pollution (apps leak junk like "2.1.156" into the window NAME).
|
|
# window-name pollution (apps leak junk like "2.1.156" into the window NAME).
|
|
|
-set -g @wtitle '#{?#{||:#{==:#{pane_title},},#{==:#{pane_title},#{host}}},#{pane_current_command},#{=/24/…:pane_title}}'
|
|
|
|
|
|
|
+# @wtitle = full (feeds Ghostty title), @wtab = truncated (feeds status-bar tabs).
|
|
|
|
|
+set -g @wtitle '#{?#{||:#{==:#{pane_title},},#{==:#{pane_title},#{host}}},#{pane_current_command},#{pane_title}}'
|
|
|
|
|
+set -g @wtab '#{?#{||:#{==:#{pane_title},},#{==:#{pane_title},#{host}}},#{pane_current_command},#{=/24/…:pane_title}}'
|
|
|
|
|
+# Forward the active pane's title to the outer terminal (Ghostty tab/window title)
|
|
|
|
|
+set -g set-titles on
|
|
|
|
|
+set -g set-titles-string '#{E:@wtitle}'
|
|
|
# Tab: index:(NpZ) title — pane count + zoom flag prefixed in parens, only when split.
|
|
# Tab: index:(NpZ) title — pane count + zoom flag prefixed in parens, only when split.
|
|
|
-setw -g window-status-format ' #I:#{?#{>:#{window_panes},1},(#{window_panes}p#{?window_zoomed_flag,Z,}) ,}#{E:@wtitle} '
|
|
|
|
|
-setw -g window-status-current-format ' #I:#{?#{>:#{window_panes},1},(#{window_panes}p#{?window_zoomed_flag,Z,}) ,}#{E:@wtitle} '
|
|
|
|
|
|
|
+setw -g window-status-format ' #I:#{?#{>:#{window_panes},1},(#{window_panes}p#{?window_zoomed_flag,Z,}) ,}#{E:@wtab} '
|
|
|
|
|
+setw -g window-status-current-format ' #I:#{?#{>:#{window_panes},1},(#{window_panes}p#{?window_zoomed_flag,Z,}) ,}#{E:@wtab} '
|
|
|
setw -g window-status-current-style 'bg=colour4 fg=colour15 bold'
|
|
setw -g window-status-current-style 'bg=colour4 fg=colour15 bold'
|
|
|
set -g pane-border-status top
|
|
set -g pane-border-status top
|
|
|
|
|
|
|
@@ -58,7 +63,26 @@ bind w display-menu -T "Windows" \
|
|
|
|
|
|
|
|
bind-key -n M-w new-window
|
|
bind-key -n M-w new-window
|
|
|
|
|
|
|
|
|
|
+# Navigation hierarchy (no prefix), shared with Zed where possible:
|
|
|
|
|
+# Shift+arrow -> tabs/windows (flat, left/right only)
|
|
|
|
|
+# Ctrl+Shift+arrow -> panes (the 2D grid). Same chord in Zed.
|
|
|
|
|
+# Modified arrows arrive as legacy CSI 1;6 sequences, so tmux parses C-S-Left
|
|
|
|
|
+# natively -- no user-keys translation needed. Never use Cmd here: Ghostty
|
|
|
|
|
+# owns it and never forwards it to tmux.
|
|
|
|
|
+# -r lets you hold/repeat within repeat-time.
|
|
|
|
|
+bind-key -n -r S-Left previous-window
|
|
|
|
|
+bind-key -n -r S-Right next-window
|
|
|
|
|
+
|
|
|
|
|
+bind-key -n -r C-S-Left select-pane -L
|
|
|
|
|
+bind-key -n -r C-S-Right select-pane -R
|
|
|
|
|
+bind-key -n -r C-S-Up select-pane -U
|
|
|
|
|
+bind-key -n -r C-S-Down select-pane -D
|
|
|
|
|
+
|
|
|
# Fork Claude Code session into a new window
|
|
# Fork Claude Code session into a new window
|
|
|
bind R source-file ~/.tmux.conf \; display "Reloaded"
|
|
bind R source-file ~/.tmux.conf \; display "Reloaded"
|
|
|
|
|
|
|
|
-bind f run-shell 'T="Fork ($(date "+%a %H:%M"))"; tmux new-window -a -n "$T" "claude --dangerously-skip-permissions --continue --fork-session"; tmux select-pane -T "$T"'
|
|
|
|
|
|
|
+bind f run-shell 'T="Fork ($(date "+%a %H:%M"))"; tmux new-window -a -n "$T" "claude --dangerously-skip-permissions --resume --fork-session"; tmux select-pane -T "$T"'
|
|
|
|
|
+
|
|
|
|
|
+# >>> tmux-claude-status >>>
|
|
|
|
|
+source-file /Users/tom/.claude/tmux-claude-status.conf
|
|
|
|
|
+# <<< tmux-claude-status <<<
|