I have long wanted a way to store and retrieve Desktop items. That is, change the items on my Desktop according to the task I'm currently working on -- dev, doc, design, surf. Well, I tried with some simple mv commands in Terminal, and it seemed to work fine. So I wrote a short script to handle this task.
I placed my script in ~/bin, and remember to make it executable (chmod 755 scriptname). The first time you run it, it will create a top-level storage directory in ~/Library/Desktops. It will then create a file named _current_ in that directory, which will contain the name of the "current" desktop items that are in ~/Desktop.
The first time the script is run, the "current" desktop item storage will be called "default." If the desktop script is run without any parameters, it will list the available storage names. The current one will be marked with >>. If a paramater is supplied to the script, it will either retreive the items from an existing storage bin, or create a new storage bin if none exists with that name.
I have only tested it on my PowerBook with 10.4, so I made 10.4 a requirement. I guess Spotlight is needed to get the update done in the Finder. I imagine that one should only use storage names with ordinary identifiers -- that is, they should start with a letter and not contain any spaces or other weird characters. I have not tested using non-standard names; the script would need some work to handle them properly, I think.
Warning!
I do not take any responsibility for this script and what it does. mv can be destructive so be careful. It hasn't broken anything for me yet, but I have only been using it for a couple of days. Usually I only make scripts for own usage -- I'm no expert in scripting, so if you can see any flaws or obvious mistakes, please add a comment.
[robg adds: I tested this on a Core Duo mini, and it seems to work just fine. It's an interesting idea, sort of like a simplified version of true virtual desktops.]

