MLFlexer / resurrect.wezterm

A plugin to restore windows, tabs and panes for Wezterm inspired by tmux-resurrect
MIT License
92 stars 2 forks source link

Restore last session after closing wezterm #64

Open MLFlexer opened 1 month ago

MLFlexer commented 1 month ago

It would be nice to restore your session from where you left off after opening wezterm for the first time after closing all wezterm processes.

This would probably require storing state about the last active workspace or similar

ChrisGVE commented 4 days ago

Yes, I like the granularity of Resurrect and Smart Workspace. However, having the ability to save the whole session when quitting (or crashing, if possible) and restoring it upon re-entry would be very sweet.

MLFlexer commented 3 days ago

Yes, I like the granularity of Resurrect and Smart Workspace. However, having the ability to save the whole session when quitting (or crashing, if possible)

From what I could gather from the last time I looked into this (#4 ), this isn't as easy as there is no exit event to hook into for saving the current state. This could be done by modifying a keybinding to save the current state and then quitting, but I myself don't quit Wezterm this way, i ussually kill my instance by killing it via. my window manager.

However if this keybinding is something that is desired, then please let me know by commenting or opening a new issue.

and restoring it upon re-entry would be very sweet.

I think this is possible with the gui-events and by saving meta data about the latest session in a file, I just havn't had time to come around to this yet.

I am currently super busy with University until at least the 16th of Dec. so I cannot give any promises for when this feature will be implemented. However I do plan to implement this in the upcoming future and if no one else beats me to it, then you can probably expect it at the latest around new years. However if you or anyone else wants to give it a try before new years, then I would love to ping pong and review a PR :smile:

Also thanks for commenting, I had not seen that this issue had 3 likes as I don't get notified about likes, but it seems that this is a much desired feature, so comments like this reminds me of what to prioritize :smile: