A desktop pet for Wayland, in Rust. Speaks wlr-layer-shell directly, reads raw key events from /dev/input, renders through shared-memory buffers. Its eyes follow the cursor.
I wanted a desktop pet on Hyprland, the kind that used to live on Windows desktops years ago. Wayland has no equivalent of an always-on-top, click-through, input-transparent window that a compositor just hands you. Getting that overlay right meant talking to the compositor’s own protocols, not a toolkit abstraction built for normal application windows.
The harder problem showed up once the overlay worked: a surface that correctly asks for no keyboard interactivity also never gets told when a key is pressed. There was no protocol-legal way to know the user was typing.
The keyboard watcher opens every /dev/input/eventN node it can and spawns a thread per device instead of filtering to actual keyboards first. It works because a typical machine only has a handful of event nodes, but it is the kind of shortcut that stops being fine on a machine with more input devices attached.