Repolode
Akarshjha03

Akarshjha03/ProximityLockSystem

A Python CLI that automatically locks your desktop when your paired Bluetooth phone or smartwatch moves out of range.

Stars
146
Forks
12
Open issues
0
Last commit
last month

What is it?

Proximity Lock System is a command-line tool that monitors nearby Bluetooth devices and locks your computer when a device you chose, such as your phone or smartwatch, can no longer be detected. It is aimed at people who want the screen locked automatically when they step away from their desk.

After you pick your device during setup, the tool periodically scans for it. It counts consecutive misses and triggers the operating system's lock command once a configurable threshold is reached. Polling interval, scan duration, unlock pause and miss threshold are set in a config file.

Lock commands are platform-specific: rundll32 LockWorkStation on Windows, CGSession on macOS, and gnome-screensaver-command on Linux, with notes on swapping in alternatives for other desktop environments. It is installed from PyPI and depends on pybluez.

Key features

  • 01Monitors a chosen Bluetooth device and detects when it goes out of range.
  • 02Locks the session after a configurable number of consecutive missed scans.
  • 03Pauses checks for a set time after locking or manual unlock.
  • 04Supports Windows, macOS and Linux with platform-specific lock commands.
  • 05Installable from PyPI and configurable through a config module.

Use cases

  • Locking a office desktop automatically when you walk away with your phone.
  • Adding a simple presence-based lock on a shared home computer.
  • Experimenting with Bluetooth proximity detection in Python.

Quick start

  1. 1

    Install pybluez

    pip install pybluez
  2. 2

    Install the application

    pip install proximity-lock-system
  3. 3

    Set up the service and choose your phone

    proximity-lock setup
  4. 4

    Start monitoring

    proximity-lock start

Things to know

  • The README asks you to test it in a virtual machine first because it locks your actual system.
  • Lock commands are platform-specific, and on Linux or macOS you may need to edit core.py for your desktop environment.
  • Requires a working Bluetooth adapter and a Python version of 3.8 or newer.
  • Licensed under AGPL-3.0, a copyleft license that requires sharing modified source code when run as a network service.

Topics

FAQ

What is ProximityLockSystem?
A Python CLI that automatically locks your desktop when your paired Bluetooth phone or smartwatch moves out of range. Proximity Lock System is a command-line tool that monitors nearby Bluetooth devices and locks your computer when a device you chose, such as your phone or smartwatch, can no longer be detected. It is aimed at people who want the screen locked automatically when they step away from their desk.
Is ProximityLockSystem free to use? What license does it have?
ProximityLockSystem is open source under the AGPL-3.0 license. Check the license terms before using it in commercial products.
Is ProximityLockSystem still maintained?
Updated within 6 months. The last commit to ProximityLockSystem was on Sep 10, 2026.
What can I use ProximityLockSystem for?
Locking a office desktop automatically when you walk away with your phone. Adding a simple presence-based lock on a shared home computer. Experimenting with Bluetooth proximity detection in Python.
How do I install ProximityLockSystem?
Install pybluez: pip install pybluez Install the application: pip install proximity-lock-system Set up the service and choose your phone: proximity-lock setup Start monitoring: proximity-lock start
Where can I get ProximityLockSystem?
The source code and installation instructions are on GitHub: https://github.com/Akarshjha03/ProximityLockSystem

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects