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.
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.