tmux: improve ghostty window titles

This commit is contained in:
2026-05-07 21:50:25 -07:00
parent 0fbb831462
commit a56d93d4b1
3 changed files with 11 additions and 0 deletions

View File

@@ -26,6 +26,11 @@ function omz_termsupport_precmd {
function omz_termsupport_preexec {
emulate -L zsh
setopt extended_glob
case "$1" in
(tmux[[:space:]]##(a|attach|attach-session)(|[[:space:]]*))
return
;;
esac
local CMD=${1[(wr)^(*=*|sudo|ssh|rake|-*)]} #cmd name only, or if this is sudo or ssh, the next cmd
title "$CMD" "%100>...>${2:gs/%/%%}%<<"
}

View File

@@ -1,3 +1,8 @@
# Create a new Codex session from the current pane path and switch to it.
# Prefix + C starts a new session without prompting for a name.
bind-key C new-session -c '#{pane_current_path}' 'codex --dangerously-bypass-approvals-and-sandbox'
set -g status-right '#($HOME/dotfiles/dotfiles/lib/functions/multiplexer_host_label 2>/dev/null || multiplexer_host_label 2>/dev/null || hostname -s) #{?window_bigger,[#{window_offset_x}#,#{window_offset_y}] ,}"#{=21:pane_title}" %H:%M %d-%b-%y'
set -g status-right-length 150
set -g set-titles on
set -g set-titles-string '#{?#{==:#{session_name},#{window_name}},#{session_name},#{session_name}:#{window_name}}#{?pane_title, - #{pane_title},}'

View File

@@ -102,6 +102,7 @@
force = true;
text = ''
confirm-close-surface = false
shell-integration-features = cursor,no-sudo,no-title,no-ssh-env,no-ssh-terminfo,path
'';
};
}