Wire tab_bar_show_new_tab_button option into types.py and parse.py

Registers the new bool option so kitty can parse it from kitty.conf
and expose it via get_options(). Default is False (off).
This commit is contained in:
mcrmck
2026-03-22 17:16:22 -04:00
parent 3e85db684d
commit fd6940a0aa
2 changed files with 5 additions and 0 deletions

View File

@@ -1351,6 +1351,9 @@ class Parser:
def tab_bar_min_tabs(self, val: str, ans: dict[str, typing.Any]) -> None:
ans['tab_bar_min_tabs'] = tab_bar_min_tabs(val)
def tab_bar_show_new_tab_button(self, val: str, ans: dict[str, typing.Any]) -> None:
ans['tab_bar_show_new_tab_button'] = to_bool(val)
def tab_bar_style(self, val: str, ans: dict[str, typing.Any]) -> None:
val = val.lower()
if val not in self.choices_for_tab_bar_style:

View File

@@ -460,6 +460,7 @@ option_names = (
'tab_bar_margin_height',
'tab_bar_margin_width',
'tab_bar_min_tabs',
'tab_bar_show_new_tab_button',
'tab_bar_style',
'tab_fade',
'tab_powerline_style',
@@ -663,6 +664,7 @@ class Options:
tab_bar_margin_height: TabBarMarginHeight = TabBarMarginHeight(outer=0, inner=0)
tab_bar_margin_width: float = 0
tab_bar_min_tabs: int = 2
tab_bar_show_new_tab_button: bool = False
tab_bar_style: choices_for_tab_bar_style = 'fade'
tab_fade: tuple[float, ...] = (0.25, 0.5, 0.75, 1.0)
tab_powerline_style: choices_for_tab_powerline_style = 'angled'