views:

584

answers:

3

I'd love to have a utility that would save and restore my current desktop state, much like sessions in Firefox. At best, it would freeze every application's state, open window positions, etc. and provide a scriptable interface to restore them at any time, just as you'd left them.

More realistically, I could make a list of what applications were open, hide/minimize them, hide them from the dock, etc., so that restoring them (if they were still open) would appear to resume them - and so that it would be hard to accidentally close them.

Most minimally, I could add a new desktop surface to Leopard Spaces for each saved session, and move everything there, using Spaces itself as a sort of stack.

The use case is:

  1. I start working on something - say, this very question - and so I open up stackoverflow in Firefox, I launch XCode and ScriptDebugger, I write a few lines of code, and realize I'm stuck till I find an answer
  2. I add a "Keep working on SessionSaver" calendar event to iCal, or a task to OmniFocus
  3. I save my current session
  4. I attach an AppleScript to the iCal event or OmniFocus task that will reopen the session I saved in step 3

I see something in Carbon about archiving window hierarchies, but I'd want this to work in 64-bit Cocoa in Snow Leopard. (I'm currently using 10.5.6 on a Mac Pro.)

FinderWindowManager does something like this for Finder windows.

+1  A: 

If you want to freeze the applications' states, is it what suspend/hibernate does?

Edit: Just realized what you want to archive. I'm using Linux, I would start a new X session if I want something like this.

+1  A: 

You could do something like this with virtual machines, though obviously there would be a performance penalty and I'm not sure whether you can run Leopard itself under a virtual machine. (You just suspend the VM duplicate it and then restart it).

Certainly doing this natively for the OS would require a huge amount of storage as you have to duplicate the memory and the entire hard drive (as changes to the hard drive could be incompatible with the saved state).

I imagine that at somepoint in the future something like this could be done using ZFS.

Singletoned
I don't think it needs to be that robust. I'm not saving the machine for archival purposes; I'm just putting aside what I was working on so I can come back to it later.
Jay Levitt
A: 

I've seen a few attempts at this lately...

Relaunch

Worksets

Jay Levitt