Saving sessions: for real this time?

Asked by Nathan on 2017-03-07

There's a fairly old thread (https://answers.launchpad.net/terminator/+question/25135) regarding the ability to save sessions in Terminator. This thread mentions that this feature is targeted to 1.0.

2.0 is looming on the horizon, and the feature is still not in. Or possibly I'm just not smart enough to find it in the settings. Even money, that.

So, let's resurrect the discussion. What are the chances of getting this feature on the roadmap?

At a minimum, I think we need to remember (I hope Launchpad doesn't mangle this list):

* What windows are open

* What tabs belong to each window (including tab title and ideally pwd)

With this minimum set of features, I feel like I'd be 80% of the way there. The remaining 20%:

* Restore each tab's scrollback

* Restore each tab's history (probably can't be solved by Terminator, as it requires the user's shell to play along)

* Remember which workspace each window was on

With this, a reboot would be basically transparent.

Thoughts?

Question information

Language:
English Edit question
Status:
Answered
For:
Terminator Edit question
Assignee:
No assignee Edit question
Last query:
2017-03-07
Last reply:
2017-03-08

Perhaps you should readthedocs... By which I mean:

http://terminator-gtk3.readthedocs.io/en/latest/preferences.html#prefs-layouts
http://terminator-gtk3.readthedocs.io/en/latest/layouts.html

Your minimum is already there and has been since 0.97 I think.

I'm not even sure we could restore the terminals (not necessarily a tab) scrollback with the current vte widget. We don't save it as a matter of course. I suppose we could maybe do something like "cat <path>/scroll_back_${TERMINATOR_UUID}.log; bash" as the command. This would trash any colours of course, and there's also some questions over how to handle Infinite scrollback. You should raise a bug request for this (that I will then turn into a wishlist item).

As you say, history would probably have to be something done by the shell somehow. I suspect something could be done using the HISTFILE shell variable (this is in bash, what about other terminals?), combined with the TERMINATOR_UUID shell var that we set that should save and retrieve history per terminal. We can actually set shell vars, so I suppose we could set the HISTFILE ourselves if a particular option flag is set. You should raise a bug request for this (that I will then turn into a wishlist item).

The workspace thing can be a bit tricky. At the moment they all popup on the current workspace. There's some implementation details that might make this a bit of a pain to do, but it should be possible. You should raise a bug request for this (that I will then turn into a wishlist item).

(Note: *separate* wishlist items)

Nathan (elitebadger) said : #2

Yeah, I saw that. I don't want to set up a layout that I always get. I want it to remember whatever crazy layout I happen to currently be using when the program exits. I'm always creating tabs, closing tabs, renaming tabs, changing the pwd of tabs...can I just have a checkbox that does that for me?

Ah well in that case, I'm pretty sure that thread is not relevant, as it appears to me to be about saving and restoring layouts, despite the terminology used.

What you're talking about has already been requested here:
https://bugs.launchpad.net/terminator/+bug/1257259

As usual, this is open source, so if someone comes along who thinks that is useful to them (I probably wouldn't make use of something like this) then they can have a crack at implementing it and have it merged into the main code branch, provided the implementation is good and doesn't negatively affect existing functionality.

Can you help with this problem?

Provide an answer of your own, or ask Nathan for more information if necessary.

To post a message you must log in.