From 226195d18cb805f01711afa3f83de3a1ed051999 Mon Sep 17 00:00:00 2001 From: Danny Dulai Date: Tue, 17 Mar 2026 12:25:44 -0400 Subject: [PATCH] Add title_overridden field to kitty @ ls output --- kitty/tabs.py | 2 ++ kitty/window.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/kitty/tabs.py b/kitty/tabs.py index f3ee9e4cb..ff3e4d3c4 100644 --- a/kitty/tabs.py +++ b/kitty/tabs.py @@ -93,6 +93,7 @@ class TabDict(TypedDict): is_focused: bool is_active: bool title: str + title_overridden: bool layout: str layout_state: dict[str, Any] layout_opts: dict[str, Any] @@ -1388,6 +1389,7 @@ class TabManager: # {{{ 'is_focused': tab is active_tab and tab.os_window_id == current_focused_os_window_id(), 'is_active': tab is active_tab, 'title': tab.name or tab.title, + 'title_overridden': bool(tab.name), 'layout': str(tab.current_layout.name), 'layout_state': tab.current_layout.serialize(tab.windows), 'layout_opts': tab.current_layout.layout_opts.serialized(), diff --git a/kitty/window.py b/kitty/window.py index b32662855..8b3f00cf7 100644 --- a/kitty/window.py +++ b/kitty/window.py @@ -238,6 +238,7 @@ class WindowDict(TypedDict): is_focused: bool is_active: bool title: str + title_overridden: bool pid: int | None cwd: str cmdline: list[str] @@ -2088,6 +2089,7 @@ class Window: 'is_focused': is_focused, 'is_active': is_active, 'title': self.title, + 'title_overridden': self.override_title is not None, 'pid': self.child.pid, 'cwd': self.child.current_cwd or self.child.cwd, 'cmdline': self.child.cmdline,