Skip to content

Commit 5676da5

Browse files
committed
ignore actions_on_close/actions_on_focus_change/is_actions_on_removal
1 parent 846ac36 commit 5676da5

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

kitty/rc/ls.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ def convert_to_session(self, data: list[OSWindowDict]) -> str:
112112
session.append('\n')
113113

114114
for w in tab['windows']:
115+
if w['is_actions_on_close'] or w['is_actions_on_focus_change'] or w['is_actions_on_removal']:
116+
continue
115117
session.append(f'cd {w["cwd"]}\n')
116118
session.append(f'launch --var=kitty_serialize_window_id={w["id"]} {self.env_to_str(w["env"])}\n')
117119
if w['is_focused']:

kitty/window.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ class WindowDict(TypedDict):
231231
id: int
232232
is_focused: bool
233233
is_active: bool
234+
is_actions_on_close: bool
235+
is_actions_on_focus_change: bool
236+
is_actions_on_removal: bool
234237
title: str
235238
pid: int | None
236239
cwd: str
@@ -784,6 +787,9 @@ def as_dict(self, is_focused: bool = False, is_self: bool = False, is_active: bo
784787
'id': self.id,
785788
'is_focused': is_focused,
786789
'is_active': is_active,
790+
'is_actions_on_close': self in self.actions_on_close,
791+
'is_actions_on_focus_change': self in self.actions_on_focus_change,
792+
'is_actions_on_removal': self in self.actions_on_removal,
787793
'title': self.title,
788794
'pid': self.child.pid,
789795
'cwd': self.child.current_cwd or self.child.cwd,

0 commit comments

Comments
 (0)