A smart activity simulator utility that keeps your computer active while respecting your actual usage
Project description
StayActive
A smart activity simulator utility that keeps your computer active while respecting your actual usage.
Features
- Smart Mouse Movement: Randomly moves cursor within configurable pixel ranges
- Periodic Key Presses: Sends shift key presses at intervals to prevent sleep
- User Activity Detection: Automatically pauses when you're actually using your computer
- Safety First: Monitors real mouse/keyboard input and gets out of your way
- Configurable: Adjustable intervals, movement ranges, and activity timeouts
Installation
pip install stayactive
Usage
Command Line
stayactive
Python Module
from stayactive import main
main()
How It Works
StayActive runs in the background and:
- Moves your mouse cursor slightly every 3 seconds
- Presses the shift key every 60 seconds (20 × 3s intervals)
- Monitors your real activity using mouse and keyboard listeners
- Pauses automatically when you move the mouse, click, scroll, or type
- Resumes after 5 seconds of inactivity
Safety Features
- 🔴 Auto-pause: Detects real user input and pauses immediately
- 🟢 Auto-resume: Waits for inactivity before resuming automation
- 🛡️ Non-intrusive: Never interferes with your actual work
Configuration
You can modify these constants in the source:
MOVE_INTERVAL_SECONDS = 3 # How often to move mouse
MIN_PIXELS_TO_MOVE = 1 # Minimum movement distance
MAX_PIXELS_TO_MOVE = 15 # Maximum movement distance
KEY_PRESS_INTERVAL = 20 # Shift key every N mouse moves
USER_ACTIVITY_TIMEOUT = 5 # Seconds to wait after user stops
Requirements
- Python 3.6+
- pyautogui
- pynput
License
MIT License - see LICENSE file for details.
Author
Rajdeep Banik (banik.rajdeep1056@gmail.com)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stayactive-1.0.1.tar.gz.
File metadata
- Download URL: stayactive-1.0.1.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe77be3be208a1798e9d5ad4e972577587312344216af4220c475ac90fdf961c
|
|
| MD5 |
2d90cc23d5dd47096675fa7124def269
|
|
| BLAKE2b-256 |
23aa49c9ba10f3aec52e1b6451512b5bfb9b4340eb1fd01f5069354dd601e5d0
|
File details
Details for the file stayactive-1.0.1-py3-none-any.whl.
File metadata
- Download URL: stayactive-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef5efa1b48429fc59badfaaa66da032b664e8119a1c874d5c01a3aa1418ed32c
|
|
| MD5 |
58f145b3fe4bb480cf0e094311e8a919
|
|
| BLAKE2b-256 |
dd2095a5d77e836f2011a06927532a796cc9c173ee17220725a192793b6cadfc
|