66 lines
1.8 KiB
Markdown
66 lines
1.8 KiB
Markdown
# Ah ah ah, you didn't say the magic word
|
||
|
||
This `gtklock` module listens for failed unlock attempts and recreates Dennis Nedry’s “ah ah ah” lockout scene from Jurassic Park.
|
||
|
||
* **Animation:** Spawns a looping "Nedry" sprite at a random location on the screen.
|
||
* **Audio:** Plays the "ah ah ah, you didn't say the magic word" clip.
|
||
* **Safety:** Sprites avoid overlapping a configurable "deadzone" (e.g., your login box).
|
||
* **Performance:** Uses pre-warmed audio players for low latency
|
||
|
||
## Requirements
|
||
|
||
* **Build:** Meson, Ninja, Rust (Cargo), GTK+3 development headers.
|
||
* **Runtime:** `gtklock`, `gstreamer`, `gst-plugins-base`, `gst-plugins-good` (for audio playback).
|
||
|
||
## Build & Install
|
||
|
||
1. **Install Dependencies:**
|
||
```bash
|
||
sudo pacman -S meson ninja rust gtk3 gstreamer gst-plugins-base gst-plugins-good
|
||
```
|
||
|
||
2. **Build:**
|
||
```bash
|
||
meson setup builddir
|
||
meson compile -C builddir
|
||
```
|
||
|
||
3. **Install:**
|
||
```bash
|
||
sudo meson install -C builddir
|
||
```
|
||
|
||
## Usage
|
||
|
||
Run `gtklock` with the module path:
|
||
|
||
```bash
|
||
gtklock -m /usr/lib/gtklock/ahfail-module.so
|
||
```
|
||
|
||
### Arguments
|
||
|
||
* `--deadzone=X,Y,W,H`: Defines a rectangle where sprites will *not* spawn (e.g., to keep your password field visible).
|
||
```bash
|
||
gtklock -m ahfail-module.so -- --deadzone=860,440,200,200
|
||
```
|
||
*(Note the `--` separator before module arguments)*
|
||
|
||
* `--audio-uri=URI`: Override the default audio clip.
|
||
```bash
|
||
gtklock -m ahfail-module.so -- --audio-uri=file:///home/user/custom.mp3
|
||
```
|
||
|
||
## Development
|
||
|
||
* **Run Tests:** `cargo test`
|
||
* **Benchmarks:** `cargo test --test benchmarks -- --nocapture`
|
||
* **Linting:** `cargo clippy`
|
||
|
||
## Customization
|
||
|
||
To change the default sprite or audio:
|
||
1. Replace files in `assets/`.
|
||
2. Update `assets/ahfail.gresource.xml`.
|
||
3. Rebuild with Meson.
|