From 50d5deb9fe238dc6e3d76b86b0bb03c1db960e36 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 5 Jun 2024 06:04:25 +0530 Subject: [PATCH] Debug output: Use proper output for titlebar colors --- kitty/debug_config.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/kitty/debug_config.py b/kitty/debug_config.py index e660fe893..ee37d877b 100644 --- a/kitty/debug_config.py +++ b/kitty/debug_config.py @@ -21,7 +21,7 @@ from .fast_data_types import Color, SingleKey, num_users, opengl_version_string, from .options.types import Options as KittyOpts from .options.types import defaults from .options.utils import KeyboardMode, KeyDefinition -from .rgb import color_as_sharp +from .rgb import color_as_sharp, color_from_int from .types import MouseEvent, Shortcut, mod_to_names AnyEvent = TypeVar('AnyEvent', MouseEvent, Shortcut) @@ -101,6 +101,15 @@ def compare_opts(opts: KittyOpts, print: Print) -> None: else: if f == 'kitty_mod': print(fmt.format(f), '+'.join(mod_to_names(getattr(opts, f)))) + elif f in ('wayland_titlebar_color', 'macos_titlebar_color'): + if val == 0: + cval = 'system' + elif val == 1: + cval = 'background' + else: + col = color_from_int(val >> 8) + cval = color_as_sharp(col) + ' ' + styled(' ', bg=col) + colors.append(fmt.format(f) + ' ' + cval) else: print(fmt.format(f), str(getattr(opts, f)))