tmux: improve ghostty window titles
This commit is contained in:
@@ -26,6 +26,11 @@ function omz_termsupport_precmd {
|
|||||||
function omz_termsupport_preexec {
|
function omz_termsupport_preexec {
|
||||||
emulate -L zsh
|
emulate -L zsh
|
||||||
setopt extended_glob
|
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
|
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/%/%%}%<<"
|
title "$CMD" "%100>...>${2:gs/%/%%}%<<"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
# Create a new Codex session from the current pane path and switch to it.
|
# 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.
|
# 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'
|
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},}'
|
||||||
|
|||||||
@@ -102,6 +102,7 @@
|
|||||||
force = true;
|
force = true;
|
||||||
text = ''
|
text = ''
|
||||||
confirm-close-surface = false
|
confirm-close-surface = false
|
||||||
|
shell-integration-features = cursor,no-sudo,no-title,no-ssh-env,no-ssh-terminfo,path
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user