Prefer pane title over command in tmux border
Falls back to the current command when no title is set.

Assisted-by: Claude Opus 4.8 via Claude Code
change sykmkkuoqzlkpqonxltknkmskvnyxour
commit 648b96a1705168887b997b523b8a17128175f3d8
author Alpha Chen <alpha@kejadlen.dev>
date
parent lzuqtosm
diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf
index d393de2b..55fdb95a 100644
--- a/.config/tmux/tmux.conf
+++ b/.config/tmux/tmux.conf
@@ -41,7 +41,7 @@ bind -T copy-mode-vi o run-shell -C \
 set -g pane-active-border-style "fg=brightred"
 set -g pane-border-style "bg=#333333"
 set -g pane-border-status top
-set -g pane-border-format ' #{pane_current_command} '
+set -g pane-border-format ' #{?pane_title,#{pane_title},#{pane_current_command}} '
 
 set-hook -g pane-focus-out 'select-pane -P bg=#333333,fg=default'
 set-hook -g pane-focus-in 'select-pane -P bg=default,fg=default'