Download and install this package. Please, also check the details on how to install it.
New version 1.0.0 : A couple bug fixes, able to use more Bluetooth devices. You can tell me here if you have any problem. Please, remember to send your email address, if you want an answer.
Umwelt locks your Mac when you are away from it and unlocks when you come back, automatically. By measuring the strength of the Bluetooth signal from your phone or smartwatch, it "senses" when you are close or away.
See more details in the tutorial: How to install and use Umwelt.