Remote control: Keep the same naming style for ls command output

This commit is contained in:
pagedown
2022-12-12 12:53:58 +08:00
parent 032e01ebf7
commit 91576cc42f
2 changed files with 6 additions and 6 deletions

View File

@@ -139,7 +139,7 @@ def compile_match_query(exp: str, is_simple: bool = True) -> MatchPatternType:
class WindowDict(TypedDict):
id: int
is_focused: bool
is_active_window: bool
is_active: bool
title: str
pid: Optional[int]
cwd: str
@@ -616,11 +616,11 @@ class Window:
def __repr__(self) -> str:
return f'Window(title={self.title}, id={self.id})'
def as_dict(self, is_focused: bool = False, is_self: bool = False, is_active_window: bool = False) -> WindowDict:
def as_dict(self, is_focused: bool = False, is_self: bool = False, is_active: bool = False) -> WindowDict:
return dict(
id=self.id,
is_focused=is_focused,
is_active_window=is_active_window,
is_active=is_active,
title=self.title,
pid=self.child.pid,
cwd=self.child.current_cwd or self.child.cwd,