bongocat

A Linux daemon that counts your keystrokes straight from the kernel.

Go · Linux evdev · GTK 4 · systemd · Source on GitHub

The problem

I wanted live keypress and click counts in my status bar, plus an on-screen overlay of the keys I’m pressing for screen recordings, without a heavyweight app or anything that hooks into a particular desktop environment.

What I built

The kernel’s input devices feed two programs: the counter daemon, which drives the Waybar module, and the GTK 4 key overlay.

A small Go daemon reads raw input events from the kernel’s evdev devices (/dev/input/event*) and keeps per-session and lifetime counts of keypresses and left and right clicks. It runs as a systemd user service and drives a Waybar module, where a click toggles between session and lifetime totals. A separate GTK 4 overlay draws the most recent keys with Cairo. An install script builds it, copies the config and enables the service, and --uninstall removes it all.

Key decisions

What I’d do next

← All projects