Take a screenshot on every mouse click.
ClickSnap listens to raw mouse events via Linux evdev (/dev/input/event*) and automatically saves a full-screen screenshot whenever you press the left, right or middle mouse button. Useful for collecting click datasets, activity logging, UX research and more.
Built with .NET 10 and Avalonia.
⚠️ Linux only (Wayland & X11). All processing happens locally — no data ever leaves your machine.
- 🖱️ Capture on any mouse button press (left / right / middle)
- 📁 Custom output folder, persisted between runs (
~/.config/ClickSnap/settings.txt) - 🚀 Auto-start recording when a folder is already configured
- ⏱️ Configurable delay before capture, so window switching has time to finish
- 🛡️ Anti-spam: clicks are ignored while a screenshot is pending / in progress
- 🌍 Works on Wayland (wlroots and GNOME/KDE via XDG Desktop Portal) and X11
- 🧹 Automatically removes GNOME's duplicate screenshots from
~/Pictures
Mouse events are read directly from evdev, so click detection works on any display server. For the actual screen capture the best available tool is picked automatically:
| Environment | Screenshot backend |
|---|---|
| Wayland · wlroots (Sway, Hyprland, Wayfire, river) | grim |
| GNOME (Wayland / X11) | XDG Desktop Portal via gjs |
| KDE Plasma | spectacle |
| X11 (any DE) | scrot / maim / import (ImageMagick) / gnome-screenshot |
-
Linux
-
.NET SDK 10.0 (or retarget
net8.0inClickSnap.csproj) -
Read access to
/dev/input/event*— add your user to theinputgroup:sudo usermod -aG input $USER # then log out and log back in
-
At least one screenshot tool for your environment (most are preinstalled):
grim,gjs,spectacle,scrot,maim,imagemagick,gnome-screenshot
git clone https://github.com/YOUR_USERNAME/ClickSnap.git
cd ClickSnap
dotnet run -c ReleasePublish a self-contained binary:
dotnet publish -c Release -r linux-x64 --self-contained- Launch the app.
- Press Browse… and pick a folder for screenshots.
- Press Start (on the next launch recording starts automatically).
- Click anywhere — each click saves a file like
screenshot_20260812_062700_0001.png.
| Setting | Where |
|---|---|
| Output folder | ~/.config/ClickSnap/settings.txt |
| Capture delay | ScreenshotDelayMs constant in MainWindow.axaml.cs (default 500 ms) |
- «No mouse device found» — you don't have access to
/dev/input/event*. Add yourself to theinputgroup (see above) and re-login. compositor doesn't support wlr-screencopy-unstable-v1— you're not on a wlroots compositor; ClickSnap automatically falls back to the XDG Desktop Portal.- Screenshots appear in
~/Picturesinstead of my folder — make suregjsis installed (it ships with GNOME) and update to the latest version.
If you find ClickSnap useful, consider supporting its development:
There is also a Donate button inside the app.
GNU Affero General Public License v3.0 (AGPL-3.0). See LICENSE for details.