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