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:
parent
3e85db684d
commit
fd6940a0aa
2 changed files with 5 additions and 0 deletions
3
kitty/options/parse.py
generated
3
kitty/options/parse.py
generated
|
|
@ -1351,6 +1351,9 @@ def tab_bar_margin_width(self, val: str, ans: dict[str, typing.Any]) -> None:
|
|||
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:
|
||||
|
|
|
|||
2
kitty/options/types.py
generated
2
kitty/options/types.py
generated
|
|
@ -460,6 +460,7 @@
|
|||
'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'
|
||||
|
|
|
|||
Loading…
Reference in a new issue