Skip to content
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

Remember open tabs between sessions #80

Closed
tomyo opened this issue Sep 1, 2021 · 5 comments · Fixed by #581
Closed

Remember open tabs between sessions #80

tomyo opened this issue Sep 1, 2021 · 5 comments · Fixed by #581
Labels
enhancement New feature or request

Comments

@tomyo
Copy link

tomyo commented Sep 1, 2021

Hi, awesome extension, good job!, I replaced Guake with ddterm recently because of better Wayland support and performance.

The only thing missing is for my tabs to be remembered when I log back in my session.

By remembered I mean: how many where open, and on what location each.

Since I can't find an option for this, nor issues, probably is a feature request.

I could give a try creating a MR if I get a bit of guidance...

Thanks!

@amezin
Copy link
Member

amezin commented Sep 7, 2021

Yes, it's not implemented.

You'll need to save tab list somewhere when the window is being closed (or before the window is closed), and load it next time (if available).

Gtk.Application.query-end signal has been added recently for this purpose. However, it seems that Gnome apps don't use it actively.

Overall, ddterm is just a Gtk app, so session save/restore should be implemented like in any other Gtk app.

Writing a thorough guide will require time and effort similar to implementing the feature, so please ask specific questions if needed. However, I've never implemented a feature like this myself (at least in Gtk apps).

@justus-saul
Copy link

Hi,

this is actually the only thing I am missing a bit after migrating to ddterm from guake recently. Apart from that for me ddterm beats it by all means. 👍

I sadly have not experience at all in writing Gtk apps or well anything with frontend related. But I have one question: Would ddterm really need to use query-end to achieve a feature like this? Wouldn't it be easier to keep a file up to date on run time on opening/closing a terminal tab and load it on start?

For me keeping the actual terminal session isn't really important, but having the same tabs open with their last location would be neat.

@amezin
Copy link
Member

amezin commented Sep 7, 2021

Wouldn't it be easier to keep a file up to date on run time on opening/closing a terminal tab and load it on start?

I see no reason to write to a file multiple times when you can do that only once.

ddterm alone won't make a noticeable difference, but if people start writing all software like this, it'll increase SSD wear and reduce battery run time.

If you need to access open tabs while ddterm is running - a D-Bus interface is likely a better solution #79

@amezin amezin added the enhancement New feature or request label Oct 1, 2021
@mpql
Copy link

mpql commented Dec 27, 2021

I see no reason to write to a file multiple times when you can do that only once.

ddterm alone won't make a noticeable difference, but if people start writing all software like this, it'll increase SSD wear and reduce battery run time.

One possible caveat I can offer: I noticed I was in need of this feature when another gnome extension either reloaded or crashed the top bar, and all of my tabs were gone. In the case of reloading, I imagine that (or another) Gtk signal could be used, but in the case of crashing, I think it would not. A manual "Save Defaults" option might cover that, though. 🤔

@amezin
Copy link
Member

amezin commented Sep 21, 2023

Does anyone know a GNOME app that has session save and restore feature?

amezin added a commit that referenced this issue Oct 9, 2023
@amezin amezin closed this as completed in 64b10c1 Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants