As a recent Mac convert, I want a trash can I don't have to remember to empty. I searched high and low for a utility to mimick Windows' Recycle Bin, where a maximum limit can be set on the size of the bin, and the least recently trashed files are deleted to keep the bin under the limit.
I found Compost, but it costs money :). So I wrote my very first AppleScript instead, which suits me fine. With this script added as a Folder Action on the user's ~/.Trash folder, trashed items' modification dates are updated to the time of trashination. Then the script checks if the total size of the Trash folder is under a certain limit, and if it's not, it starts deleting items until the trash is under the limit.
This only works for the Trash folder in your home folder -- if you have links to trash on remote volumes, frankly, I have no idea what's going to happen. The size of the trash folder is calculated dividing the number of file blocks reported by du by 2048, because that's what worked on my MacBook. Your Mac might be different. Finally, if you trash a file bigger than your trash limit, all of your trash will be emptied.
To set this up, save the code as a script in the folder /Users -> your_username -> Library -> Scripts -> Folder Action Scripts, then open the app Folder Actions Setup (in the Applications -> AppleScript folder), and manually add the folder ~/.Trash as an action folder, and then add this script to it. Then try trashing! The limit is set in the code to 2048 megabytes. If anyone's written a better script, or knows a better way, please let me know.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20061022114138978