Merge branch 'rc-ls' of https://github.com/page-down/kitty
This commit is contained in:
commit
b6c6316b7b
@ -46,7 +46,7 @@ class TabMouseEvent(NamedTuple):
|
|||||||
class TabDict(TypedDict):
|
class TabDict(TypedDict):
|
||||||
id: int
|
id: int
|
||||||
is_focused: bool
|
is_focused: bool
|
||||||
is_active_tab: bool
|
is_active: bool
|
||||||
title: str
|
title: str
|
||||||
layout: str
|
layout: str
|
||||||
layout_state: Dict[str, Any]
|
layout_state: Dict[str, Any]
|
||||||
@ -707,7 +707,7 @@ class Tab: # {{{
|
|||||||
active_window = self.active_window
|
active_window = self.active_window
|
||||||
for w in self:
|
for w in self:
|
||||||
yield w.as_dict(
|
yield w.as_dict(
|
||||||
is_active_window=w is active_window,
|
is_active=w is active_window,
|
||||||
is_focused=w.os_window_id == current_focused_os_window_id() and w is active_window,
|
is_focused=w.os_window_id == current_focused_os_window_id() and w is active_window,
|
||||||
is_self=w is self_window)
|
is_self=w is self_window)
|
||||||
|
|
||||||
@ -950,7 +950,7 @@ class TabManager: # {{{
|
|||||||
yield {
|
yield {
|
||||||
'id': tab.id,
|
'id': tab.id,
|
||||||
'is_focused': tab is active_tab and tab.os_window_id == current_focused_os_window_id(),
|
'is_focused': tab is active_tab and tab.os_window_id == current_focused_os_window_id(),
|
||||||
'is_active_tab': tab is active_tab,
|
'is_active': tab is active_tab,
|
||||||
'title': tab.name or tab.title,
|
'title': tab.name or tab.title,
|
||||||
'layout': str(tab.current_layout.name),
|
'layout': str(tab.current_layout.name),
|
||||||
'layout_state': tab.current_layout.layout_state(),
|
'layout_state': tab.current_layout.layout_state(),
|
||||||
|
|||||||
@ -139,7 +139,7 @@ def compile_match_query(exp: str, is_simple: bool = True) -> MatchPatternType:
|
|||||||
class WindowDict(TypedDict):
|
class WindowDict(TypedDict):
|
||||||
id: int
|
id: int
|
||||||
is_focused: bool
|
is_focused: bool
|
||||||
is_active_window: bool
|
is_active: bool
|
||||||
title: str
|
title: str
|
||||||
pid: Optional[int]
|
pid: Optional[int]
|
||||||
cwd: str
|
cwd: str
|
||||||
@ -616,11 +616,11 @@ class Window:
|
|||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
return f'Window(title={self.title}, id={self.id})'
|
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(
|
return dict(
|
||||||
id=self.id,
|
id=self.id,
|
||||||
is_focused=is_focused,
|
is_focused=is_focused,
|
||||||
is_active_window=is_active_window,
|
is_active=is_active,
|
||||||
title=self.title,
|
title=self.title,
|
||||||
pid=self.child.pid,
|
pid=self.child.pid,
|
||||||
cwd=self.child.current_cwd or self.child.cwd,
|
cwd=self.child.current_cwd or self.child.cwd,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user