BlueSense allows you to set up actions to be executed when you leave or return to your Mac. Linked to your Bluetooth device, it detects the device' presence and, with the help of AppleScript, executes any action you want. Originally, I designed BlueSense to help protect my Mac, locking the system, activating password protection, putting the display in standby mode, and turning off the light on my desk (with the help of Arduino) whenever I left my desk, and vise-versa.