You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Plugin Submission : SaveLastSessionLayout Uses Layout to Auto-Save Last session and CWD on Terminal Window Close #654
This is my first major submission so excuse any short comings, I am submitting a Plugin that saves Last Session including Current Working Directory automatically and on next Launch the use can you the Context Menu (Right Click)->Layouts to launch the saved Session.
(1) IMPORTANT: This would require a minor bug fix which I have reported due to which layouts are incorrectly loaded Ref: vssdeo@e7f9c73 If you don't have any other saved Layouts the plugin will still work.
(2) The Plugin uses existing Layout mechanism and uses the name: SaveLastSessionLayout in layouts also visible via "Preferences"->Layouts and behaves naturally. You can override etc.
(3) How to Use
a) Launch ./terminator
b) Go to Preferences->Plugins->SaveLastSessionLayout and (tick to enable)
c) Now you can open new tabs and change directory etc
d) When you close your main window (with all the tabs and others) this layout would be saved.
e) Next launch ./terminator and using Context Menu(right click)->Layouts->SaveLastSessionLayout you can reload the saved session
f) NOTE: the layout of last closed window will be saved for next time so ensure that that window is closed last
(4) On development part there were a few choices:
First one was to use existing event close-term and would not have required touching the main code,which I wanted but in case of single window(terminal) it was causing edge case where I was not able to get the describe_layout section to save. With this option the code would have saved the session for multiple tabs but for a single window(term) it wouldn't have remembered the layout.
Second option was to add single line changes to introduce a pre-close-term event and the behavior would have been consistent.
For now I have chosen the second option but the code for first option is also in but commented.
Since I am new to this, any suggestions would be welcome.
Hi @mattrose thanks for update. I didn't expect such a quick merge and great support from the team :) so was awaiting any discussion.
Just a note from above comment 3) How To Use point f) NOTE: the layout of last closed window will be saved for next time so ensure that that window is closed last.
a)So when there is a single window and multiple tabs, then config file should be appended appropriately.
b)On next launch you would need to launch and right click and select last saved session.
c)The main confusion (for which I wanted feedback) was if there are multiple windows and one has multiple tabs which you want to save, just ensure that the one with multiple-tabs is closed last.
In any case pls do let me know the steps you are taking to test so I will also cross check on my side.
Hi @mattrose. It was my bad, I just checked, it seems I had not pushed the changes that involved the (second-option) above in first comment of adding an additional signal pre-close-term as I was waiting for someone from team to check.
It was my bad, sorry for the inconvenience. Should work after the pull again.
Wow, this is amazing - thank you so much for adding this! I would like to enable this in my setup, but am not very familiar with working with terminator plugins. Is there a simple way to include this one in to my existing setup, or would I need to build terminator from scratch? I'm on version 2.1.1. with GNOME Linux.
Please see the first comment (3) How to Use should be quite simple. Terminator is in python so a clone of master branch and running ./terminator should suffice.
Amazing, thanks for the quick reply! I'll try that. OOC, do you know if it's possible to add this plugin to the existing terminator setup, so that I am not locked into this version of terminator? I would assume terminator allows an option to import plugins.
The issue is that a minor change was brought to the main tree by adding a signal to keep the code change minimal and consistent behavior, (read comment 1). So for the plugin to work you would require a latest code base for terminator.
Activity
vssdeo commentedon Oct 16, 2022
Branch on my repository: https://github.com/vssdeo/terminator/tree/654-Plugin-Submission-SaveLastSessionLayout-Uses-Layout-to-Auto-Save-Last
Pull Request: #655
mattrose commentedon Oct 30, 2022
This is merged. I'm keeping the bug open now because it doesn't completely work for me.
vssdeo commentedon Oct 30, 2022
Hi @mattrose thanks for update. I didn't expect such a quick merge and great support from the team :) so was awaiting any discussion.
Just a note from above comment 3) How To Use point f) NOTE: the layout of last closed window will be saved for next time so ensure that that window is closed last.
a)So when there is a single window and multiple tabs, then config file should be appended appropriately.
b)On next launch you would need to launch and right click and select last saved session.
c)The main confusion (for which I wanted feedback) was if there are multiple windows and one has multiple tabs which you want to save, just ensure that the one with multiple-tabs is closed last.
In any case pls do let me know the steps you are taking to test so I will also cross check on my side.
vssdeo commentedon Oct 30, 2022
Hi @mattrose. It was my bad, I just checked, it seems I had not pushed the changes that involved the (second-option) above in first comment of adding an additional signal pre-close-term as I was waiting for someone from team to check.
It was my bad, sorry for the inconvenience. Should work after the pull again.
mattrose commentedon Oct 31, 2022
This is fixed by #655
hamzamerzic commentedon Nov 9, 2022
Wow, this is amazing - thank you so much for adding this! I would like to enable this in my setup, but am not very familiar with working with terminator plugins. Is there a simple way to include this one in to my existing setup, or would I need to build terminator from scratch? I'm on version 2.1.1. with GNOME Linux.
vssdeo commentedon Nov 9, 2022
Hi
Please see the first comment (3) How to Use should be quite simple. Terminator is in python so a clone of master branch and running ./terminator should suffice.
Let me know if anything else.
hamzamerzic commentedon Nov 9, 2022
Amazing, thanks for the quick reply! I'll try that. OOC, do you know if it's possible to add this plugin to the existing terminator setup, so that I am not locked into this version of terminator? I would assume terminator allows an option to import plugins.
vssdeo commentedon Nov 9, 2022
The issue is that a minor change was brought to the main tree by adding a signal to keep the code change minimal and consistent behavior, (read comment 1). So for the plugin to work you would require a latest code base for terminator.
hamzamerzic commentedon Nov 9, 2022
Makes sense - thanks again, really appreciate it!