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:
- 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
- I add a "Keep working on SessionSaver" calendar event to iCal, or a task to OmniFocus
- I save my current session
- 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.