xmonad icon indicating copy to clipboard operation
xmonad copied to clipboard

Save state between computer restarts/crashes

Open seagreen opened this issue 6 years ago • 6 comments

This might be a horrific idea, but I'm typing it from a laptop that crashes occasionally when it sleeps, and it would be awesome if XMonad had a "resume last session" option similar to web browsers.

seagreen avatar Mar 21 '19 02:03 seagreen

Not so much horrific as difficult, unless it's a full desktop environment and all programs "speak" that environment sufficiently. Granting that most programs used with modern desktop environments do speak XDG session protocol — but many of the programs used with xmonad don't even speak the original ICCCM session protocol very well if at all.

geekosaur avatar Mar 21 '19 02:03 geekosaur

Would scoping it to just terminals make it more tractable? XMonad makes it so convenient to spread out that I often end up with 5 or 6 terminals open pretty quickly. Reopening GUI programs manually wouldn't be much of an inconvenience if I could restart terminals automatically.

seagreen avatar Mar 21 '19 03:03 seagreen

Not really, no. How does xmonad or any other program know the difference?

geekosaur avatar Mar 21 '19 05:03 geekosaur

Makes sense. I may take a shot at making a script to do it myself, if I do I'll report how it goes in #xmonad IRC.

In the meantime feel free to close this, since it's not really actionable. Thanks for the help!

seagreen avatar Mar 21 '19 16:03 seagreen

What about https://linux.die.net/man/1/xsm? I have absolutely no idea if that still works in 2021 but it might.

liskin avatar Jul 25 '21 14:07 liskin

Most modern programs don't speak enough of the xsm protocol; they expect an XDG session manager.

geekosaur avatar Jul 25 '21 14:07 geekosaur