def response_from_kitty(self, boss: Boss, window: Optional[Window], payload_get: PayloadGetType) -> ResponseType: default_opts = parse_launch_args()[0] opts = LaunchCLIOptions() for key, default_value in default_opts.__dict__.items(): val = payload_get(key) if val is None: val = default_value setattr(opts, key, val) tab = self.tabs_for_match_payload(boss, window, payload_get)[0] w = do_launch(boss, opts, payload_get('args') or [], target_tab=tab) return None if payload_get('no_response') else str(getattr(w, 'id', 0))
def launch(self, *args): from kitty.launch import parse_launch_args, launch opts, args = parse_launch_args(args) launch(self, opts, args)