diff --git a/gen-config.py b/gen-config.py index 8fdbc2a8a..813684c66 100755 --- a/gen-config.py +++ b/gen-config.py @@ -1,8 +1,10 @@ -#!/usr/bin/env python +#!./kitty/launcher/kitty +launch # License: GPLv3 Copyright: 2021, Kovid Goyal +import os import re +import sys from typing import List from kitty.conf.generate import write_output @@ -22,6 +24,9 @@ def patch_color_list(path: str, colors: List[str], name: str, spc: str = ' ') def main() -> None: + if 'prewarmed' in getattr(sys, 'kitty_run_data'): + os.environ.pop('KITTY_PREWARM_SOCKET') + os.execlp(sys.executable, sys.executable, '+launch', __file__, *sys.argv[1:]) from kitty.options.definition import definition write_output('kitty', definition) nullable_colors = []