https://github.com/cyrinux/gyrolock
Lock systemd sessions when laptop is shake
https://github.com/cyrinux/gyrolock
accelerometer gyroscope gyrosensor laptop locking logind systemd
Last synced: 3 days ago
JSON representation
Lock systemd sessions when laptop is shake
- Host: GitHub
- URL: https://github.com/cyrinux/gyrolock
- Owner: cyrinux
- License: isc
- Created: 2022-03-12T20:49:37.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-10T10:58:49.000Z (about 3 years ago)
- Last Synced: 2025-12-26T02:29:22.587Z (4 months ago)
- Topics: accelerometer, gyroscope, gyrosensor, laptop, locking, logind, systemd
- Language: Go
- Homepage:
- Size: 33.2 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# GyroLock

Lock systemd sessions when the laptop is shake or move fast based on [gyroscope](https://en.wikipedia.org/wiki/Gyroscope) values
Tested on a Dell Latitude 7420.
## Install
Available as archlinux AUR package `gyrolock`. This will install also `systemd-lock-handler` AUR package and `swaylock`.
## Activate
```
sudo systemctl enable --now gyrolock.service
systemctl --user enable --now systemd-lock-handler.service
systemctl --user enable --now swaylock.service
```
## Settings
Sensitivity can be set in an systemd unit override with `SENSITIVITY` env var.
Try your own value, default is 5.
## Debug
Get sensors values with:
```
$ DEBUG=1 SENSITIVITY=5 sudo ./gyrolock
```