mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-19 15:04:50 +02:00
Allow specifying watchers in session files and via a command line argument
This commit is contained in:
@@ -48,6 +48,7 @@ class SpecialWindowInstance(NamedTuple):
|
||||
cwd: Optional[str]
|
||||
overlay_for: Optional[int]
|
||||
env: Optional[Dict[str, str]]
|
||||
watchers: Optional[Watchers]
|
||||
|
||||
|
||||
def SpecialWindow(
|
||||
@@ -57,9 +58,10 @@ def SpecialWindow(
|
||||
cwd_from: Optional[int] = None,
|
||||
cwd: Optional[str] = None,
|
||||
overlay_for: Optional[int] = None,
|
||||
env: Optional[Dict[str, str]] = None
|
||||
env: Optional[Dict[str, str]] = None,
|
||||
watchers: Optional[Watchers] = None
|
||||
) -> SpecialWindowInstance:
|
||||
return SpecialWindowInstance(cmd, stdin, override_title, cwd_from, cwd, overlay_for, env)
|
||||
return SpecialWindowInstance(cmd, stdin, override_title, cwd_from, cwd, overlay_for, env, watchers)
|
||||
|
||||
|
||||
def add_active_id_to_history(items: Deque[int], item_id: int, maxlen: int = 64) -> None:
|
||||
@@ -333,14 +335,14 @@ class Tab: # {{{
|
||||
special_window: SpecialWindowInstance,
|
||||
location: Optional[str] = None,
|
||||
copy_colors_from: Optional[Window] = None,
|
||||
allow_remote_control: bool = False
|
||||
allow_remote_control: bool = False,
|
||||
) -> Window:
|
||||
return self.new_window(
|
||||
use_shell=False, cmd=special_window.cmd, stdin=special_window.stdin,
|
||||
override_title=special_window.override_title,
|
||||
cwd_from=special_window.cwd_from, cwd=special_window.cwd, overlay_for=special_window.overlay_for,
|
||||
env=special_window.env, location=location, copy_colors_from=copy_colors_from,
|
||||
allow_remote_control=allow_remote_control
|
||||
allow_remote_control=allow_remote_control, watchers=special_window.watchers
|
||||
)
|
||||
|
||||
def close_window(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user