mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-19 23:14:55 +02:00
Allow remote control to launch a new OS window when there is none
This commit is contained in:
@@ -81,11 +81,14 @@ instead of the active tab
|
||||
if val is None:
|
||||
val = default_value
|
||||
setattr(opts, key, val)
|
||||
target_tab = None
|
||||
tabs = self.tabs_for_match_payload(boss, window, payload_get)
|
||||
if tabs and tabs[0]:
|
||||
w = do_launch(boss, opts, payload_get('args') or [], target_tab=tabs[0])
|
||||
return None if payload_get('no_response') else str(getattr(w, 'id', 0))
|
||||
return None
|
||||
target_tab = tabs[0]
|
||||
elif payload_get('type') not in ('os-window', 'background'):
|
||||
return None
|
||||
w = do_launch(boss, opts, payload_get('args') or [], target_tab=target_tab)
|
||||
return None if payload_get('no_response') else str(getattr(w, 'id', 0))
|
||||
|
||||
|
||||
launch = Launch()
|
||||
|
||||
Reference in New Issue
Block a user