there’s a pretty slick device called the “thanko usb pc lock” that will unlock and lock your pc based on how close your are to it (physically).
the only downside is the software that comes with seems a bit wonky, but–bryan batchelder rolled up a better version which to address all the complaints we had, the future features look pretty sweet too.