Locks your KDE screen when your Bluetooth device (phone/watch) leaves range. Shows a system tray icon with real-time signal graph, toggle switch, and threshold slider.
Phone moves away β RSSI drops below threshold
β
bt-lock-daemon detects N consecutive misses
β
Screen locks (qdbus / loginctl)
β
Phone returns β unlock β grace period β monitoring resumes
- System tray icon (near Wi-Fi/clock in KDE panel)
- Click β popup with:
- Toggle switch β enable / disable guard instantly
- Threshold slider β set lock distance (-100 to -30 dBm)
- Real-time RSSI graph β 60-second history with dBm values
- Per-session config β changes take effect immediately
- Grace period after unlock (lets Bluetooth reconnect before re-arming)
- Works with any Bluetooth device: phone, watch, tag
curl -fsSL https://raw.githubusercontent.com/SolVerNA/bt-lock-guard/master/install.sh | sudo bashThe installer:
- Detects your package manager and installs dependencies
- Scans for nearby Bluetooth devices and shows a numbered list
- You pick your phone/watch by number β no manual MAC entry needed
- Starts the daemon and tray automatically
git clone https://github.com/SolVerNA/bt-lock-guard
cd bt-lock-guard
# Install files + start tray, then pick device from GUI:
sudo make install
# β or specify MAC directly:
sudo make install MAC=AA:BB:CC:DD:EE:FFsudo pacman -S bluez bluez-utils python-pyqt5 python-dbus
sudo systemctl enable --now bluetooth.service
git clone https://github.com/SolVerNA/bt-lock-guard
cd bt-lock-guard
sudo make install MAC=AA:BB:CC:DD:EE:FFsudo apt-get install bluez python3-pyqt5 python3-dbus
git clone https://github.com/SolVerNA/bt-lock-guard
cd bt-lock-guard
sudo make install MAC=AA:BB:CC:DD:EE:FFClick the tray icon β "Scan & pick device" at the bottom of the popup.
The tray will scan for 8 seconds, show a list of nearby Bluetooth devices, and let you switch with one click β no reinstall needed.
| Package | Arch / Manjaro | Debian / Ubuntu |
|---|---|---|
| Bluetooth daemon + tools | bluez |
bluez |
| l2ping, hcitool | bluez-utils |
included in bluez |
| Qt5 tray UI | python-pyqt5 |
python3-pyqt5 |
| D-Bus bindings | python-dbus |
python3-dbus |
- systemd + KDE Plasma (X11 or Wayland)
| dBm | Distance (approx) | Use case |
|---|---|---|
| -40 | ~1m (same room) | Very tight β desk only |
| -60 | ~3β5m | Same room |
| -70 | ~5β10m | Leave room |
| -80 | ~10β15m | Leave apartment |
| -90 | ~20m+ | Leave building |
Start at -80 dBm and adjust using the live graph in the tray popup.
# Daemon
journalctl --user -u bt-lock-daemon@AA:BB:CC:DD:EE:FF -f
# Tray
journalctl --user -u bt-lock-tray -fgit clone https://github.com/SolVerNA/bt-lock-guard
cd bt-lock-guard
sudo make uninstallOr if you already have the repo cloned:
sudo make uninstallConfig is kept at ~/.config/bt-lock-guard/config.json.
MIT β SolVerNA