Skip to content

Implement session save and restore for kitty #2

@kovidgoyal

Description

@kovidgoyal

Basically save the window position, layout, tabs, scrollback, etc. and automatically restore them on restart.
kitty issue: kovidgoyal/kitty#1197

There is some prior art and partial solutions linked in that issue.

Some subtleties include when exactly to save the current state, when the quit
action is triggered? When the last OS window is closed? When any OS Window is
closed? Manually? All of the above?

Implementation will be purely in Python.

See the serialize_state() and as_dict() methods in various classes for how
serialization should be done. See session.py for how sessions are instantiated
as a starting point for how to implement state restoration.

See the Window.as_text method for how to get scrollback contents.

There should be some way to save and restore sessions manually as well.

Metadata

Metadata

Assignees

Labels

PythonmediumModerate implementation difficulty

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions