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

Saving session regularly #1503

Open
Boscop opened this Issue Apr 7, 2018 · 12 comments

Comments

3 participants
@Boscop

Boscop commented Apr 7, 2018

It seems that ConEmu only saves the session when exited cleanly, so that means when I get a BSOD or go into sleep mode and my battery runs out, it only restores to the session that was active when I last exited ConEmu cleanly, which is very frustrating because most exits aren't clean because I run my laptop for months until something like the above happens and in that time I open several tabs in ConEmu that I'd want to restore.

Would it be possible to make ConEmu save the session every minute or so, so that it doesn't require a clean exit to restore to the last active session? :)

@Maximus5 Maximus5 added this to To Do in ConEmu Apr 7, 2018

@Maximus5 Maximus5 moved this from To Do to Ready for Testing in ConEmu Apr 25, 2018

@m0n

This comment has been minimized.

m0n commented Apr 28, 2018

Worst Feature Award Winner! :(

My Windows startup script starts FAR in a ConEmu window, other 3 programs in other ConEmu window, 4 logging programs in yet another ConEmu window and a single app in another ConEmu.

Now I get these errors twice in a minute:

"Can't open file for writing!
C:\Prg\Windows\ConEmu\ConEmu\ConEmu.xml
ErrCode=0x00000020"

or

"Failed to write configuration file, Code=32
C:\Prg\Windows\ConEmu\ConEmu\ConEmu.xml"

Seems ConEmu instances wants to write to the same ConEmu.xml file in the same time.

Additionally please make a checkbox for poor users dislike to save 4*180k to SSD in every minutes! Or optimize things and save only when specific parameters/tasks are changed.

(temporarily I inserted pauses between ConEmu windows starts to eliminate concurrency)

@m0n

This comment has been minimized.

m0n commented Apr 28, 2018

@Boscop: modify Sleep mode to Hybrid sleep or Hibernate! Hybrid sleep saves RAM to disk, so if battery runs out, RAM will be loaded from disk, otherwise works like normal Sleep.

@m0n

This comment has been minimized.

m0n commented Apr 28, 2018

Ohh - unfortunately after a Sleep ConEmu instances synchronized together 😆

@Maximus5

This comment has been minimized.

Owner

Maximus5 commented Apr 28, 2018

You may disable autosave if you don't use "Auto save/restore open tabs" and "Auto save window size/pos on exit" is off.

@Maximus5 Maximus5 moved this from Ready for Testing to In progress in ConEmu Apr 28, 2018

@Boscop

This comment has been minimized.

Boscop commented Apr 28, 2018

@m0n I don't have hybrid sleep in Win8.1 and not enough disk space to hibernate. Also, I get a BSOD every once in a while when waking up the laptop so that wouldn't help.
@Maximus5 It doesn't have to save the session every minute, but every (half) hour would even be sufficient, as long as it doesn't only save on clean exit. Is there any chance of having this feature?
EDIT: Ah nvm, it's already implemented, thanks :)
But I agree with m0n, saving every minute is probably a bit too often, especially for SSDs..

@m0n

This comment has been minimized.

m0n commented Apr 29, 2018

Thanks Maximus5, I turned off "Auto save window size/pos on exit" and everything is 👌

@Maximus5 Maximus5 moved this from In progress to Ready for Testing in ConEmu May 6, 2018

@Boscop

This comment has been minimized.

Boscop commented May 12, 2018

Does this save/restore session feature work for saving the sessions of all open ConEmu windows? Or only one? :)

@Maximus5

This comment has been minimized.

Owner

Maximus5 commented May 12, 2018

Of course, there is no way to save on one configuration several same name values. How do you think ConEmu may distinguish them?
You may use either named configurations or different xml files.

@Boscop

This comment has been minimized.

Boscop commented May 12, 2018

Each window could generate a UUID when it's created (if a window doesn't already have a way to uniquely identify it), and store the session with that as the key..

@Maximus5

This comment has been minimized.

Owner

Maximus5 commented May 12, 2018

It can. But you didn't invent the way how windows would reload them on start! Don't you run them all from the same shortcut?

@Boscop

This comment has been minimized.

Boscop commented May 13, 2018

I imagine it could work like Sublime Text: When the exe starts, it will open all windows from the last session, where each window contains its tabs from the last session :)

@Maximus5

This comment has been minimized.

Owner

Maximus5 commented May 13, 2018

It's impossible due to ConEmu architecture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment