-
Notifications
You must be signed in to change notification settings - Fork 260
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
Plugin Submission : SaveLastSessionLayout Uses Layout to Auto-Save Last session and CWD on Terminal Window Close #654
Comments
Branch on my repository: https://github.com/vssdeo/terminator/tree/654-Plugin-Submission-SaveLastSessionLayout-Uses-Layout-to-Auto-Save-Last Pull Request: #655 |
This is merged. I'm keeping the bug open now because it doesn't completely work for me. |
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. 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. |
This is fixed by #655 |
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. |
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. |
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. |
Makes sense - thanks again, really appreciate it! |
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.
The text was updated successfully, but these errors were encountered: