snsr
A playful Python-based "screensaver" that randomly moves your mouse and simulates key presses to keep your screen active.
Features
- Moves the mouse to random screen positions.
- Simulates random key presses.
- Keeps your system from going idle (uses
wakepywhen available). - Auto-selects an input backend per platform (
pynputon Linux,pyautoguielsewhere) with fallback.
Usage
Using uv
uvx snsr
snsr auto-detects your platform/session and picks the best backend (Linux defaults to the pynput backend; macOS and Windows use pyautogui), with fallback if the preferred backend fails to start.
Using pip
pip install snsr
snsr
It will:
- Move your mouse to random points (or jiggle relative on Linux)
- Press a random key (default set:
a,s,d,f,j,k,l) - Repeat every few seconds
Options
snsr [--interval LOW HIGH] [--keys CHARS] [--backend {auto,pyautogui,pynput}]
[--no-failsafe] [--dry-run] [-v]
--interval LOW HIGH— random sleep range in seconds between actions (default1 5).--keys CHARS— string of single-character keys to choose from (defaultasdfjkl).--backend— force a specific backend, or leave onauto.--no-failsafe— disable pyautogui's corner-abort failsafe (off by default — moving the mouse to a screen corner aborts).--dry-run— log what would happen without actually moving the mouse or pressing keys.-v,--verbose— debug logging.
Logs are written to a per-platform user state directory (e.g. ~/.local/state/snsr/snsr.log on Linux, %LOCALAPPDATA%\snsr\snsr.log on Windows, ~/Library/Logs/snsr/snsr.log on macOS).
To Stop
Press Ctrl+C in the terminal to exit. By default the pyautogui backend also lets you abort by slamming the mouse into a screen corner.
Notes
- Ensure your OS allows simulated input events from Python scripts.
- Useful for keeping your machine awake during long tasks (e.g., rendering, builds, meetings).
Disclaimer
This project is intended for educational or personal use only. Use responsibly and respect your organization's policies regarding input automation.
MIT License © 2025
Metadata
Release files for snsr 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| snsr-0.1.9.tar.gz | 5.2 kB | Without provenance | Details for snsr-0.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| snsr-0.1.9-py3-none-any.whl | Python 3 | none | any | Details for snsr-0.1.9-py3-none-any.whl |
Total release size: 11.4 kB
Release files / snsr-0.1.9.tar.gz
| Download URL | snsr-0.1.9.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6cff1c70ac7c9b07117f65e6f3ca7bae930c5012634d1dd39eb63ba7d1a42fda
|
|
BLAKE2b-256 checksum How to use checksums |
29fcf3b441753cb0b1baa44c83f4af880770e9d4799a48f9858248c725060337
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / snsr-0.1.9-py3-none-any.whl
| Download URL | snsr-0.1.9-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f97221dae3fed9dfcc9586de6a3d657f32d32fea2c77c2744ba3d26aa05e0968
|
|
BLAKE2b-256 checksum How to use checksums |
cd342f49c86b0e8d037c4c70a7e43e668a2042e780ee46daa3a4ab68f73d556f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for snsr 0.1.9
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.