Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Save and restore terminal state #563

Closed
fanghuaqi opened this issue Dec 28, 2021 · 8 comments
Closed

Feature request: Save and restore terminal state #563

fanghuaqi opened this issue Dec 28, 2021 · 8 comments

Comments

@fanghuaqi
Copy link

Is your feature request related to a problem? Please describe.

I didn't find a way to save or restore the terminator window state, it is useful, when I have opened a lot of tabs and in each tab windows splited, but when suddenly my sessions(such as VNC) hangs, I have to reopen all the tabs and spilt windows again.

Describe the solution you'd like

Maybe the window state can be saved every 1 hour or configurable time, and user can also save the window state as layout or something.

Describe alternatives you've considered

In https://tabby.sh/about/features, it support :

Persistent history and tabs
Tabby remembers your open tabs, and when you accidentally close them, restores the complete terminal state.

In tmux, user can attach to previous sessions or save or restore sessions.

@mattrose
Copy link
Member

I think the best way of accomplishing this is to create a "current" layout that gets updated every time the layout changes.

Alternately, we could put a switch in the preferences that would auto save the "default" layout.

I will play.

@fanghuaqi
Copy link
Author

Hi @mattrose , I tried that layout saving method, it can restore the layout, but all the directory where shell executed all reset to $HOME, you still need to cd back to it, and the command histories are all disappeared.

Thanks
Huaqi

@gitbuddy99
Copy link

I'm testing Terminator for the first time, and would also love if it had autosave on closing for its layout, current directory of each terminal, and separate scrollback buffer (history) for each terminal (also autosaved)
Unless this is already possible with settings or plugins I haven't found?
Thanks

@dotkt
Copy link

dotkt commented Aug 15, 2022

nice feature. i also need it

@ghost
Copy link

ghost commented Aug 1, 2023

It would be nice to have the opened tabs saved and the state preserved upon exit, so when i open terminator again, all the tabs that i previously opened in the last session are there and the paths are saved. Just like Dolphin file manager.

@markdoerr
Copy link
Contributor

Hi terminator developers and @fanghuaqi,
I added a plugin that adds a "SaveUserSessionLayout" ContextMenu item (s. PR #878).
When this menu item is selected, the current state of the session with all layouts is saved as "SaveUserSessionLayout".
One can then use the terminator -s option to select this layout.

I hope, it solves the issue.

@fanghuaqi
Copy link
Author

Hi terminator developers and @fanghuaqi, I added a plugin that adds a "SaveUserSessionLayout" ContextMenu item (s. PR #878). When this menu item is selected, the current state of the session with all layouts is saved as "SaveUserSessionLayout". One can then use the terminator -s option to select this layout.

I hope, it solves the issue.

Woooow... cool, thanks for the plugin. @markdoerr

@markdoerr
Copy link
Contributor

You're welcome, @fanghuaqi :)
please test it and provide some feedback (on my computer, it works nicely as desired ;).

To test it, just clone the repo with the new branch , and follow the instructions in the install.md:

python3 setup.py build
(sudo) python3 setup.py install --single-version-externally-managed --record=install-files.tx

good luck !

mattrose added a commit that referenced this issue Feb 17, 2024
feat: plugin - Save current user layout of all sessions, fixes #563
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

No branches or pull requests

5 participants