From 3d6fe93297a58862ef7c6d0cbc026fed97e951dc Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 29 Jul 2019 09:23:29 +0530 Subject: [PATCH] DRYer --- kitty/config.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kitty/config.py b/kitty/config.py index cc28b4b07..2d4d3e24a 100644 --- a/kitty/config.py +++ b/kitty/config.py @@ -403,7 +403,8 @@ def handle_deprecated_hide_window_decorations_aliases(key, val, ans): handle_deprecated_hide_window_decorations_aliases.key = True log_error('The option {} is deprecated. Use hide_window_decorations instead.'.format(key)) if to_bool(val): - ans['hide_window_decorations'] = True + if is_macos and key == 'macos_hide_titlebar' or (not is_macos and key == 'x11_hide_window_decorations'): + ans['hide_window_decorations'] = True def expandvars(val, env): @@ -628,6 +629,4 @@ def load_config(*paths, overrides=None, accumulate_bad_lines=None): if opts.background_opacity < 1.0 and opts.macos_titlebar_color: log_error('Cannot use both macos_titlebar_color and background_opacity') opts.macos_titlebar_color = 0 - if (is_macos and getattr(opts, 'macos_hide_titlebar', False)) or (not is_macos and getattr(opts, 'x11_hide_window_decorations', False)): - opts.hide_window_decorations = True return opts