From e48adf7a07d039920784c42e97729001c10e5227 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 23 Jul 2021 22:26:10 +0530 Subject: [PATCH] Allow leading/trailing spaces in tab_activity_symbol --- docs/changelog.rst | 2 ++ kitty/options/definition.py | 3 ++- kitty/options/utils.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 177d2ef19..e4fe9bbb9 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -58,6 +58,8 @@ To update |kitty|, :doc:`follow the instructions `. is meant to match over line breaks, you will need to match over both. (:iss:`3845`) +- Allow leading or trailing spaces in :opt:`tab_activity_symbol` + 0.21.2 [2021-06-28] ---------------------- diff --git a/kitty/options/definition.py b/kitty/options/definition.py index f8633017b..4d622ee6c 100644 --- a/kitty/options/definition.py +++ b/kitty/options/definition.py @@ -932,7 +932,8 @@ opt('tab_activity_symbol', 'none', option_type='tab_activity_symbol', long_text=''' Some text or a unicode symbol to show on the tab if a window in the tab that -does not have focus has some activity. +does not have focus has some activity. If you want to use leading or trailing spaces +surround the text with quotes. ''' ) diff --git a/kitty/options/utils.py b/kitty/options/utils.py index 06aca5fff..65b1dc70c 100644 --- a/kitty/options/utils.py +++ b/kitty/options/utils.py @@ -614,7 +614,7 @@ def tab_fade(x: str) -> Tuple[float, ...]: def tab_activity_symbol(x: str) -> Optional[str]: if x == 'none': return None - return x or None + return tab_title_template(x) or None def tab_title_template(x: str) -> str: