diff --git a/docs/changelog.rst b/docs/changelog.rst index 7fb9904fd..912ed00d7 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -16,6 +16,9 @@ To update |kitty|, :doc:`follow the instructions `. - Fix :opt:`background_opacity` incorrectly applying to selected text and reverse video text (:iss:`2177`) +- Add a new option :opt:`tab_bar_background` to specify a different color + for the tab bar (:iss:`2198`) + 0.15.0 [2019-11-27] -------------------- diff --git a/kitty/config_data.py b/kitty/config_data.py index 9218621ec..0c77f8958 100644 --- a/kitty/config_data.py +++ b/kitty/config_data.py @@ -730,6 +730,7 @@ o('active_tab_font_style', 'bold-italic', option_type=tab_font_style) o('inactive_tab_foreground', '#444', option_type=to_color) o('inactive_tab_background', '#999', option_type=to_color) o('inactive_tab_font_style', 'normal', option_type=tab_font_style) +o('tab_bar_background', 'none', option_type=to_color_or_none) # }}} diff --git a/kitty/tab_bar.py b/kitty/tab_bar.py index da5c3f75a..248a735f7 100644 --- a/kitty/tab_bar.py +++ b/kitty/tab_bar.py @@ -177,7 +177,7 @@ class TabBar: self.leading_spaces, self.sep, self.trailing_spaces, self.opts.bell_on_tab, self.bell_fg, self.opts.tab_fade, self.opts.active_tab_foreground, self.opts.active_tab_background, self.opts.inactive_tab_foreground, self.opts.inactive_tab_background, - self.opts.background, self.opts.tab_title_template + self.opts.tab_bar_background or self.opts.background, self.opts.tab_title_template ) if self.opts.tab_bar_style == 'separator': self.draw_func = draw_tab_with_separator @@ -194,7 +194,9 @@ class TabBar: self.draw_data = self.draw_data._replace(active_bg=color_from_int(spec['active_tab_background'])) if 'inactive_tab_background' in spec: self.draw_data = self.draw_data._replace(inactive_bg=color_from_int(spec['inactive_tab_background'])) - if 'background' in spec: + if 'tab_bar_background' in spec: + self.draw_data = self.draw_data._replace(default_bg=color_from_int(spec['tab_bar_background'])) + elif 'background' in spec and not self.opts.tab_bar_background: self.draw_data = self.draw_data._replace(default_bg=color_from_int(spec['background'])) self.screen.color_profile.set_configured_colors( spec.get('inactive_tab_foreground', color_as_int(self.opts.inactive_tab_foreground)),