@ttshivhula/stay-online
v1.0.1
Published
A utility to simulate user activity, preventing the system from going idle.
Downloads
1
Readme
@ttshivhula/stay-online
Stay Online is a utility built with Node.js that simulates user activity to prevent the system from recognizing it as idle. It's especially handy if you want to avoid screen locks, sleep mode, or any other inactivity-triggered actions.
Features
- Mouse Movement Simulation: Moves the mouse in a straight or circular pattern.
- Keyboard Activity: Simulates the pressing of the Shift key.
- Random Intervals: Optionally, you can set the tool to act at random intervals.
- Flexible Modes: Choose to simulate mouse movement, keyboard activity, or both.
Installation
- Ensure you have Node.js installed.
- Install
@ttshivhula/stay-online
globally:npm install -g @ttshivhula/stay-online
Usage
Run the utility with the default settings (moves the mouse every 300 seconds):
stay-online
You can customize the behavior with the following options:
-s, --seconds
: Define in seconds how long to wait after a user is considered idle. Default is 300 seconds.-p, --pixels
: Set how many pixels the mouse should move. Default is 1 pixel.-c, --circular
: Move the mouse in a circular pattern. By default, the mouse moves diagonally.-m, --mode
: Choose betweenkeyboard
,mouse
, orboth
. The default ismouse
.-r, --random
: Execute actions based on a random interval between start and stop seconds.
Example
To move the mouse in a circular pattern every 10 seconds:
stay-online -s 10 -c
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.