I have an iMac which I sometimes use as an external display for my Macbook Air. Normally, I want the iMac to go to sleep after about 30mins except when I have the Air attached.
Is there any app (or Applescript?) out there which will change/disable the sleep time when it's being used as a display, but still let the iMac sleep when the Air is not connected?