Skip to content

Add session save and restore menu actions#1091

Open
vacu9708 wants to merge 1 commit into
gnome-terminator:masterfrom
vacu9708:master
Open

Add session save and restore menu actions#1091
vacu9708 wants to merge 1 commit into
gnome-terminator:masterfrom
vacu9708:master

Conversation

@vacu9708

@vacu9708 vacu9708 commented Jun 2, 2026

Copy link
Copy Markdown

Summary

Add terminal context menu actions for saving and restoring a lightweight session layout.
This introduces a new Session submenu in the terminal popup menu with:

  • Save session
  • Restore session

Saving persists the current Terminator layout using the existing layout serialization path, including each terminal’s current working directory. Restoring loads the saved session layout in the current process and replaces the window where restore was requested.

Scope

This restores :

  • windows/panes/tabs layout
  • working directories

Implementation Notes

  • Saves the session as a reserved layout named __last_session__.
  • Hides __last_session__ from the normal Layouts submenu.
  • Restoring creates the saved layout, then destroys the initiating window so the session replaces the current window rather than opening an extra one.

Testing

  • python -m py_compile terminatorlib/terminator.py terminatorlib/terminal_popup_menu.py
  • pytest -q terminatorlib/borg.py terminatorlib/config.py terminatorlib/cwd.py terminatorlib/factory.py terminatorlib/util.py tests/test_borg.py tests/test_signalman.py

@mattrose

mattrose commented Jun 3, 2026

Copy link
Copy Markdown
Member

There's already a plugin that does this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants