Use Your iPhone or iPod touch to Lock Your Mac - Airlock
Airlock is a system preferences pane. Double-click to install it, associate it with your iPhone or iPod touch, set the security range, and that's it. I tried with my iMac 24 and my iPhone and it worked perfectly. You can even see a radar screen showing the distance between the two devices. The moment I stepped out of the limit, the screen locked. And then, as soon as I came into the perimeter, it unlocked automagically.
via gizmodo.com
I need to try this.