When your phone is close to the PC, it automatically unlocks it by measuring the Bluetooth signal strength. When you go away, it automatically locks it.
Warning: for this app to work, you'll need to install the PC version on your computer, from https://www.gadgetisht.com.</br></br>