Skip to content
scadoshiPublic

About

Cross-platform desk lock in Rust: raw evdev on Linux, a Core Graphics event tap on macOS, webcam photos of anyone who touches it, unlocked by a secret.

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Latest commit

 

History

32 Commits

Folders and files

Repository files navigation

gotcha

Catches people trying to use your computer while you're away. Grabs all input devices so nothing works, snaps a timestamped webcam photo when someone tries, and unlocks with a secret key.

Working on macOS and Linux.

Setup

macOS

The app needs Accessibility API access to grab input devices.

  1. Open System Settings > Privacy & Security > Accessibility
  2. Add your terminal app (e.g. Terminal.app, iTerm2, Alacritty) to the list
  3. Run with cargo run

If input stops being blocked after a macOS update, remove the terminal from that list and add it back.

Linux

The app needs access to /dev/input/* devices to grab keyboards and mice.

  1. Add your user to the input group:
    sudo usermod -aG input $USER
    
  2. Log out and back in for the group change to take effect
  3. Verify with groups: input should be in the list
  4. Run with cargo run

Usage

  1. Run cargo run, or cargo run -- --password <secret> (--pw for short) to choose the secret
  2. All keyboard and mouse input is grabbed and the desktop stops responding
  3. Any input triggers a timestamped webcam photo saved to gotchas/
  4. Type the secret to release all devices and exit: test unless you passed --password. Letters and digits only, and case does not matter, since a key press carries no Shift

About

Cross-platform desk lock in Rust: raw evdev on Linux, a Core Graphics event tap on macOS, webcam photos of anyone who touches it, unlocked by a secret.

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages