Skip to main content

Tapir

A small autoclicker for Linux Wayland desktops, with a compact Qt window.

Clicks go through a virtual uinput mouse, so they work under any compositor. No X11 tools (xdotool, pynput, PyAutoGUI) are involved.

Features

  • Interval in hours, minutes, seconds and milliseconds (10 ms minimum), with an optional random variation of ± N ms
  • Left, right or middle button; single or double click
  • Repeat N times or until stopped, with a click counter
  • Optional countdown (0–10 s) when starting from the window or the tray, to give you time to place the cursor
  • Clicks at the current cursor position and never moves the cursor
  • Global start/stop hotkey: a bind managed in Hyprland, or an evdev fallback elsewhere
  • Command line and Unix socket: tapir toggle | start | stop
  • Tray icon coloured by state (grey stopped, amber countdown, green running)
  • English or French interface, following the system language until you pick one
  • Settings saved on every change

Installation

Arch Linux / CachyOS package

cd packaging
makepkg -sif

The PKGBUILD builds the last commit of this repository: uncommitted changes, including new files that are not committed yet, are not included. -f rebuilds the package even when one with the same version was built before; without it, makepkg reinstalls the old file. It installs the tapir command, the desktop entry and the udev rule, and pacman reloads udev for you.

With pipx or pip

pipx install tapir-autoclicker

evdev ships no prebuilt wheel, so pip compiles it: you need a C compiler, the Python headers and the kernel headers (Arch: base-devel; Debian and Ubuntu: build-essential python3-dev). The udev rule and the desktop entry are not installed this way: see Permissions.

From source

sudo pacman -S pyside6 python-evdev python-tomli-w
python -m tapir

Python 3.12 or newer. On other distributions, install PySide6, evdev and tomli-w from your package manager or with pip. From a source checkout, replace tapir with python -m tapir in the commands below.

Permissions

Tapir creates its virtual mouse through /dev/uinput and needs write access to it. Many systems already give it to the logged-in user (Steam's 60-steam-input.rules does, for example). To check:

test -w /dev/uinput && echo ok

If it is not writable, install the udev rule shipped with Tapir. The Arch package does it for you; from source, run:

scripts/setup-permissions.sh

The script asks for confirmation, then runs:

sudo install -Dm644 packaging/70-tapir-uinput.rules /etc/udev/rules.d/70-tapir-uinput.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --sysname-match=uinput

Without a source checkout (pip install), create the rule directly:

echo 'KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", OPTIONS+="static_node=uinput"' | sudo tee /etc/udev/rules.d/70-tapir-uinput.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --sysname-match=uinput

The rule uses systemd's uaccess tag: only the user logged in at the seat gets access, not a whole group. Its file name has to sort before 73-seat-late.rules, where udev applies uaccess.

When access is missing, Tapir shows these instructions instead of starting.

On Hyprland, Tapir never reads your keyboard. The evdev fallback for other compositors needs read access to /dev/input/event*, usually through the input group. Being in that group lets every program you run read every keystroke, passwords included, so Tapir never adds you to it. Prefer your compositor's own shortcuts (see below).

Usage

Set the interval, button, click type and repeat mode, then press Start. The status line shows Stopped, Starting in N s or Running, and the counter shows the clicks of the current session. In "Repeat N times" mode the session stops on its own.

The list at the top left switches the interface between English and French; the change applies immediately and is saved.

The settings are locked while a session runs. When a tray is available, closing the window (the ✕ button or your compositor's close shortcut) hides it to the tray; Quit is in the tray menu. Without a tray, closing the window quits.

Global hotkey

Hyprland

Click Set… next to Hotkey and press the combination: a key with optional Super, Ctrl, Alt and Shift, or a mouse side button (Mouse 4 / Mouse 5). Esc cancels, Backspace removes the hotkey.

Tapir adds the bind to Hyprland itself with hyprctl eval (hl.bind, tagged with the description tapir). The hotkey works when Tapir's window is not focused, and the key press does not reach other applications.

  • A combination that your Hyprland config already uses is refused.
  • The bind is added again when Hyprland reloads its config, and removed when Tapir quits.
  • Hotkey starts are immediate: the countdown only applies to the window and tray.

Tested with Hyprland 0.57 and a Lua config, where hyprctl keyword is not available.

Static bind

If you prefer a permanent bind in your own config, leave Tapir's hotkey empty and add one of these.

Lua config (binds.lua):

hl.bind("SUPER + F8", hl.dsp.exec_cmd("tapir toggle"))

hyprlang config (hyprland.conf):

bind = SUPER, F8, exec, tapir toggle

Do not set the same combination in both places, or each press toggles twice.

Other compositors

Bind tapir toggle in your compositor's shortcut settings.

Alternatively, when Tapir runs outside Hyprland and can read /dev/input/event* (see Permissions), Set… works the same way and Tapir listens to your input devices itself. It reads them without grabbing them, so the key press also reaches the focused application. Devices plugged in later are picked up within a couple of seconds.

Command line

tapir           open the window, or show the one already running
tapir toggle    start or stop clicking
tapir start     start clicking now (no countdown)
tapir stop      stop clicking

Commands go to the running instance through $XDG_RUNTIME_DIR/tapir.sock, which only your user can reach. They exit with code 1 when no instance is running. Only one instance runs at a time.

Configuration

Settings are saved to ~/.config/tapir/config.toml (or $XDG_CONFIG_HOME/tapir/config.toml) on every change and loaded at startup. Invalid values fall back to their defaults.

Known limitations

  • Tapir clicks wherever the cursor is; it cannot move the cursor or target a window.
  • The tray is detected at startup. If Tapir starts before your bar, there is no tray icon and closing the window quits.
  • On Wayland, tapir or Show may not raise a window that is already visible: compositors limit focus stealing (Hyprland: misc:focus_on_activate).
  • The Hyprland conflict check compares key codes and key names. A bind written with a key name that Qt spells differently (Prior and PgUp, Escape and Esc) is not detected.
  • The managed Hyprland bind has only been tested with a Lua config.
  • When the 10 ms minimum clips the random variation, the average interval is slightly longer than the one set.
  • evdev fallback: the hotkey also reaches the focused application, and a modifier held while its device is unplugged counts as held until it is pressed again.
  • Two instances launched within the same few milliseconds can both start.

Development

python -m pytest

tapir/engine.py holds the click worker and the virtual mouse (no Qt), hotkey.py the hotkey model, Hyprland binds and evdev listener, ipc.py the socket and command line, config.py the settings file, i18n.py the French translations, and ui/ the window and tray. A test checks that every text passed to tr() has a French translation with the same placeholders.

Releasing

Set the new version in pyproject.toml and pkgver in packaging/PKGBUILD, commit, then push a matching tag:

git tag v0.2.0
git push origin v0.2.0

The Publish workflow runs the tests, checks that the tag matches the version in pyproject.toml, builds the sdist and wheel and uploads them to PyPI through trusted publishing (no API token is stored anywhere).

License

MIT, see LICENSE.

Metadata

Release files for tapir-autoclicker 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tapir-autoclicker 0.2.0
File Size Uploaded Provenance Actions
tapir_autoclicker-0.2.0.tar.gz 25.9 kB With provenance Details for tapir_autoclicker-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tapir-autoclicker 0.2.0
File Interpreter ABI Platform Actions
tapir_autoclicker-0.2.0-py3-none-any.whl Python 3 none any Details for tapir_autoclicker-0.2.0-py3-none-any.whl

Total release size: 47.7 kB

Release files / tapir_autoclicker-0.2.0.tar.gz

Download URL tapir_autoclicker-0.2.0.tar.gz
Size 25.9 kB
Tags Source
SHA-256 checksum
How to use checksums
143b8450adc528d9e70e9c5ed131992c9f7f84eca0554c2d15efdbab00cdfe5e
BLAKE2b-256 checksum
How to use checksums
248255da34ed3ce9c8fb5546e7bfad11448a56ac2528a827479d0f609c728d2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Release files / tapir_autoclicker-0.2.0-py3-none-any.whl

Download URL tapir_autoclicker-0.2.0-py3-none-any.whl
Size 21.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3071dc78cf282778c1b9f84855702b617689e9fb4d139348474fd1c0cac5f721
BLAKE2b-256 checksum
How to use checksums
109efd26607f6a6ab377546466dbdf9ebeea66ab183cad7fd3f28a7286b42556
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Security for tapir-autoclicker 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tapir_autoclicker-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page