def main() -> None: if getattr(sys, 'frozen', False) and 'darwin' not in sys.platform.lower(): setup_openssl_environment() first_arg = '' if len(sys.argv) < 2 else sys.argv[1] func = entry_points.get(first_arg) if func is None: if first_arg.startswith('@'): remote_control(['@', first_arg[1:]] + sys.argv[2:]) elif first_arg.startswith('+'): namespaced(['+', first_arg[1:]] + sys.argv[2:]) else: from kitty.main import main as kitty_main kitty_main() else: func(sys.argv[1:])
def main() -> None: if getattr(sys, 'frozen', False): ext_dir: str = getattr(sys, 'kitty_run_data').get('extensions_dir') if ext_dir: setup_openssl_environment(ext_dir) first_arg = '' if len(sys.argv) < 2 else sys.argv[1] func = entry_points.get(first_arg) if func is None: if first_arg.startswith('@'): remote_control(['@', first_arg[1:]] + sys.argv[2:]) elif first_arg.startswith('+'): namespaced(['+', first_arg[1:]] + sys.argv[2:]) else: from kitty.main import main as kitty_main kitty_main() else: func(sys.argv[1:])
def open_urls(args: List[str]) -> None: setattr(sys, 'cmdline_args_for_open', True) sys.argv = ['kitty'] + args[1:] from kitty.main import main as kitty_main kitty_main()