Worried about Free Disk Space?

Over at Macintouch, a user has contributed an Applescript that will display when the amount of freespace on the drive, drops below a preset limit.

tell application 'Finder'
-- sets up variables
set theSize to capacity of startup disk -- total size of disk
set freeSpace to free space of startup disk -- amount of free space
-- changes size in bytes to size in MB and rounds it off
set theSize to round (theSize / (1028 * 1028))
set freeSpace to round (freeSpace / (1028 * 1028))
-- calculates the percentage of free disk space
set percentFree to round (freeSpace / theSize) * 100
if percentFree  10 then
display dialog 'You have less then 10% free disk space. Your computer will explode momentarily, so please run away now.' buttons {'Run!'} with icon stop
else if percentFree  20 then
display dialog 'You have less then 20% free disk space. Your computer is preparing to explode, so please prepare to run away.' buttons {'Hmmm…'} with icon caution
else if percentFree  30 then
display dialog 'You have less then 30% free disk space. Please tell someone about this as your computer is due to explode sometime in the near future.' buttons {'OK'} with icon note
(*
else
display dialog 'You have ' & percentFree & '% free space left. Keep working until I tell you to stop.'
*)
end if
end tell

[…] Save the script somewhere, then save it again as an application rather than a script (making sure to uncheck all the options in the Save As dialog). All you have to do is make the application a startup item (in the Login Items tab of the Accounts section of the System Preferences). Every time the machine is started the app will run and warn you if you’ve reached an appropriate level of ‘explosiveness.’ If you’ve not reached any of the percentages, the user won’t see anything at all.”