A toddler-bash game where every key paints colour.
A six-month-old's hands are uncoordinated and unpredictable. Sat at a keyboard they will mash keys at random — including the Super key, modifier combinations, and anything else the compositor reserves. On Hyprland and other modern Wayland compositors, those keystrokes leak out of any normal application window and trigger compositor actions: workspace switches, application launchers, lock screens. Classic baby-bash games such as BabySmash and bambam were designed for X11 and do not handle Wayland keyboard routing correctly.
aurelia uses zwp_keyboard_shortcuts_inhibit_v1 — the Wayland keyboard-shortcuts inhibit protocol — to take exclusive ownership of every key the moment the window is focused. Nothing escapes to the compositor. Random mashing produces only calm, colourful bursts of shapes. It is a kiosk-style, Linux-native, SDL3-backed alternative to BabySmash and bambam, built from scratch in Rust to run correctly on Hyprland and any other compositor that supports the inhibit protocol.
Adults exit cleanly via a deliberate 4-key chord that a toddler is statistically unlikely to hit. A faint on-screen hint and a progress arc guide the adult through the exit sequence without exposing it to the child.
- Full keyboard capture on Wayland (Hyprland, Sway, KDE, GNOME) — Super, modifiers, every key — via
zwp_keyboard_shortcuts_inhibit_v1 - Calm visual rewards: 6 procedurally-generated shape types, 4 palettes (random per burst), hue-drifting background
- Safe-exit chord —
Ctrl+Alt+Shift+Qheld for 1 second — with an on-screen progress arc - Faint corner hint showing the exit shortcut, visible to adults, unreadable to toddlers
- Multi-monitor selection: list displays and pick by name
- Configurable particle cap with oldest-eviction (default 500)
- Single static binary, zero runtime dependencies
- MIT license
Build dependencies: cmake and a C compiler (GCC or Clang) — required to build libSDL3 from source; Rust 1.79 or later (rustup recommended).
Build:
cargo build --releaseInstall to ~/.local/bin:
./packaging/install.shThe script installs the binary to ~/.local/bin/aurelia and the .desktop entry to ~/.local/share/applications/.
# Launch on the primary monitor
aurelia
# List available monitors
aurelia --list-monitors
# Launch on a specific monitor
aurelia --monitor DP-1
# Require a 3-second hold to exit (stricter for wriggly toddlers)
aurelia --exit-hold-ms 3000
aurelia --exit-keys ctrl,shift,q # custom safe-exit chord (default ctrl,alt,shift,q)
# Lock the colour palette
aurelia --palette pastel
# Cap particles lower on slower hardware
aurelia --max-particles 200
# Verbose logging
RUST_LOG=debug aureliaHold Ctrl+Alt+Shift+Q for one second. A progress arc appears on screen as the chord is held — release early to cancel. Once the arc completes, the window closes.
If the chord is not working (e.g., keyboard grab did not release):
- Switch to another TTY:
Ctrl+Alt+F2(orF3–F6), thenpkill aurelia - Or SSH in from another machine and run
pkill aurelia
| Flag | Argument | Default | Description |
|---|---|---|---|
--monitor |
display name | primary | SDL display name to run on |
--list-monitors |
— | — | Print available display names and exit |
--exit-keys |
comma-separated keys | ctrl,alt,shift,q |
Keys that form the exit chord |
--exit-hold-ms |
milliseconds | 1000 |
How long the chord must be held |
--max-particles |
count | 500 |
Hard cap on live particles (oldest evicted) |
--palette |
palette name | random | Lock all bursts to one palette |
aurelia calls SDL3's set_keyboard_grab(true), which in turn binds zwp_keyboard_shortcuts_inhibit_v1 on the active Wayland surface, preventing the compositor from acting on any key event for the lifetime of the grab. A single-threaded main loop polls SDL events; each keypress event enqueues particles into a fixed-capacity pool — when the pool is full, the oldest particle is evicted to make room — and each particle moves via a semi-implicit Euler integrator with per-particle drag. Shape textures (circle, rounded square, triangle, star, heart, blob) are drawn procedurally at startup and rendered with additive-blend textures for the characteristic bright-on-dark look. Exit is managed by a chord state machine that tracks a bitmask of currently-held modifier keys and measures elapsed hold time against --exit-hold-ms.
cargo build --release
# Run the integration smoke tests (SDL3 must initialise on the main thread)
cargo test --test smoke_test -- --test-threads=1MIT — see LICENSE.
