We all know that Mac OS X has the very useful Login Items functionality which lets you, among other things, set up apps/scripts to run when you log in.
I'm looking for a way to setup a list of scripts/apps that run when I log out. A "Logout Items" list, if you will.
Basically, I want to write a few little cleanup scripts for myself that will run automatically when I log out or shut down.
So, I'm looking for a way to have a script (or, ideally, list of them) automatically triggered when I log out. The log out would wait for the scripts to finish (just like how the logout waits for you to click Save if an app requests it).
Is there a way to automatically trigger (a) script(s) when I log out of Mac OS X?