From d92eba82bc4267a3e5eabd8e7349aa9baa0177e3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 29 Jan 2022 11:36:58 +0530 Subject: [PATCH] Dump env vars seen by kitty for debug config --- kitty/debug_config.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kitty/debug_config.py b/kitty/debug_config.py index 2ba413bc0..47e6e8a5c 100644 --- a/kitty/debug_config.py +++ b/kitty/debug_config.py @@ -200,7 +200,7 @@ def debug_config(opts: KittyOpts) -> str: with open('/etc/lsb-release', encoding='utf-8', errors='replace') as f: p(f.read().strip()) if not is_macos: - p('Running under:' + green('Wayland' if is_wayland() else 'X11')) + p('Running under:', green('Wayland' if is_wayland() else 'X11')) p(green('Frozen:'), 'True' if getattr(sys, 'frozen', False) else 'False') p(green('Paths:')) p(yellow(' kitty:'), os.path.realpath(kitty_exe())) @@ -214,4 +214,9 @@ def debug_config(opts: KittyOpts) -> str: p(green('Loaded config overrides:')) p(' ', '\n '.join(opts.config_overrides)) compare_opts(opts, p) + p() + p(green('Environment variables seen by the kitty process:')) + ml = max(map(len, os.environ)) if os.environ else 5 + for k, v in os.environ.items(): + p(k.ljust(ml), styled(repr(v), dim=True)) return out.getvalue()