Python script that moves the mouse in an ∞ pattern after a set inactivity timeout.
- Python 3.9+
- macOS, Windows, or Linux (X11)
- Packages: see
requirements.txt - Linux note: on X11 the script uses
python-xlib+ XTEST for low-level mouse events; if this backend is unavailable it exits with a warning
mkdir infinity-mouse
cd infinity-mouse && python3 -m venv .venv/ && source .venv/bin/activate
pip install infinity-mouse
# Run the script
infinity-mouse # You may need to allow system access permissions on macOS for your terminal app
# Press CTRL+C to exit the scriptmkdir infinity-mouse
cd infinity-mouse
python.exe -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install infinity-mouse
# Run the script
python -m infinity_mouse
# Press CTRL+C to exit the scriptgit clone https://github.com/mqxym/infinity-mouse
cd infinity-mouse && python3 -m venv .venv/ && source .venv/bin/activate && pip install -r requirements.txt
# Run the script
python run.py # You may need to allow system access permissions for your terminal app
python -m infinity_mouse
# Press CTRL+C to exit the scriptgit clone https://github.com/mqxym/infinity-mouse
cd infinity-mouse
py -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
# Run the script
python run.py
# Press CTRL+C to exit the script- Adjust the
INACTIVITY_TIMEOUT_MINandINACTIVITY_TIMEOUT_MAXvalues in the script or use CLI parameters:
# Run the script with min-max timeout in seconds
infinity-mouse 80-120
python -m infinity_mouse 80-120
# Test the script
infinity-mouse --test
python -m infinity_mouse --test
# View options
infinity-mouse -h
python -m infinity_mouse -h
- Learn automation like mouse movements and processing of inputs and HMIs
- Learn pattern creation with sinus functions for the infinity movement pattern
- Build and test CI/CD workflows
- Cross-platform Python development
