From 4e3d6b97dc98dcc14c02a331541ddc8f6b9c7932 Mon Sep 17 00:00:00 2001 From: BlackAngelTVdev Date: Thu, 12 Nov 2026 12:17:33 +0100 Subject: [PATCH] feat(tab-bar): show the abbreviated cwd in the default title The tab bar has exposed the working directory of its active window since the directory indicator was added, but it stayed invisible until users edited kitty.conf. Put it in the default title template so the indicator works on a fresh start, next to the exit status already shown there. --- docs/changelog.rst | 4 ++++ kitty/options/definition.py | 2 +- kitty/options/types.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 51f8070..ae668dd 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -258,6 +258,10 @@ Detailed list of changes :kbd:`Ctrl+Shift+E` to :code:`open_url_with_hints` in :file:`kitty.conf` to restore the previous behavior. +- The default :opt:`tab_title_template` now shows the abbreviated working + directory of the tab before its title, so the directory indicator of the tab + bar is visible without configuration. + - Accessibility: :kbd:`Tab` and :kbd:`Shift+Tab` move the selection in the :doc:`file manager ` and the :doc:`command palette ` by default. A new diff --git a/kitty/options/definition.py b/kitty/options/definition.py index 15c17e7..fd87e53 100644 --- a/kitty/options/definition.py +++ b/kitty/options/definition.py @@ -2450,7 +2450,7 @@ lines is wrapped independently. opt( 'tab_title_template', - '"{fmt.fg.red}{bell_symbol}{activity_symbol}{exit_status_symbol}{secure_input_symbol}{fmt.fg.tab}{tab.last_focused_progress_percent}{title}"', + '"{fmt.fg.red}{bell_symbol}{activity_symbol}{exit_status_symbol}{secure_input_symbol}{fmt.fg.tab}{tab.last_focused_progress_percent}{tab.active_wd_abbreviated} {title}"', option_type='tab_title_template', long_text=""" A template to render the tab title. The default just renders the title with diff --git a/kitty/options/types.py b/kitty/options/types.py index d6d6ff2..b6992d6 100644 --- a/kitty/options/types.py +++ b/kitty/options/types.py @@ -704,7 +704,7 @@ class Options: tab_switch_strategy: choices_for_tab_switch_strategy = 'previous' tab_title_max_length: int = 0 tab_title_max_lines: int = 1 - tab_title_template: str = '{fmt.fg.red}{bell_symbol}{activity_symbol}{exit_status_symbol}{secure_input_symbol}{fmt.fg.tab}{tab.last_focused_progress_percent}{title}' + tab_title_template: str = '{fmt.fg.red}{bell_symbol}{activity_symbol}{exit_status_symbol}{secure_input_symbol}{fmt.fg.tab}{tab.last_focused_progress_percent}{tab.active_wd_abbreviated} {title}' tab_title_wrap: int = 0 term: str = 'xterm-kitty' terminfo_type: choices_for_terminfo_type = 'path'