Still Alive is a Python package and command-line tool designed to keep your system from going idle by simulating mouse movements at specified intervals. Whether you're giving a presentation, monitoring long-running tasks, or simply want to prevent your screen from locking, Still Alive can automate mouse movements and ensure your system stays active.
With Still Alive, you can customize when the mouse movements begin and end, as well as the frequency of those movements. The tool is command-line friendly and offers flexible configuration options to suit different scenarios.
- Simulates Mouse Movements: The tool makes slight, random mouse movements to prevent system idle.
- Customizable Timeframes: Choose specific start and end times, or define durations (in minutes) to control how long the tool runs.
- Flexible Interval Control: Specify how often the mouse moves during the active period.
- Command-Line Interface: Easily run and configure the tool from the command line, making it simple to automate.
To install the package via pip, use the following command:
pip install still-aliveThis will install the still-alive package, making it available as a command-line tool on your system.
The tool provides flexible options to control the start and end times of the mouse movements, as well as the interval between movements.
Still Alive offers several command-line arguments to configure its behavior:
--start-duration / -sd:Start time in minutes from the current time. Defaults to0, meaning it starts immediately unless otherwise specified.--end-duration / -ed:The end time is specified in minutes from the current time. If not provided, it defaults to60 minutes, meaning the execution will run for 1 hour.--start-time / -st:Start time inHH:MM(24-hour format). If not provided, the tool will either start immediately or after the specified start duration.--end-time / -et:End time in HH:MM (24-hour format). If--end-durationis not provided, the execution will default to 1 hour.--interval / -i:Interval between mouse movements, in seconds. The default is50 seconds, but you can set any interval that fits your needs.
Once executed, Still Alive begins simulating small mouse movements. The movements are very subtle, with slight, random shifts in the mouse’s position. The tool continues these movements at regular intervals (specified by --interval), until the defined end time or duration is reached.
-
Move mouse for 2 hours, starting immediately with a 30-second interval between movements:
still-alive -ed=120 -i=30
-
Start moving the mouse at 2:00 PM and stop at 6:30 PM:
still-alive -st=14:00 -et=18:30
-
Start after 10 minutes, run for 1 hour, with default intervals (50 seconds):
still-alive -sd=10 -ed=60
-
Start after 20 minutes, run unitl 4:40 PM, with 2 minutes interval
still-alive -sd=20 -et=18:40 -i=120
-
Start moving the mouse for 1 hour, with default interval
still-alive
- You should specify either the
end-time(-et) orend-duration(-ed). If neither is provided, it will execute for 1 hour. - If
start-time(-st) is not provided, the script will start immediately or after the duration specified bystart-duration(-sd). - If you provide both
start-time(-st) andstart-duration(-sd), thenstart-time(-st) takes precedence. - If you provide both
end-time(-et) andend-duration(-ed), thenend-time(-et) takes precedence.
To ensure that the tool continues running even if the terminal is closed, you can run it in the background using nohup (no hang-up). This is particularly useful if you want to keep your system active while performing long-running tasks:
nohup still-alive -et=18:00 --interval=60 &This command will run Still Alive until 6:00 PM with an interval of 60 seconds between mouse movements. The process will keep running even if you close the terminal.
If you've started Still Alive as a background process and want to stop it, follow these steps:
-
Find the process ID (PID):
ps -aux | grep still-aliveThis will list the active processes, including
still-alive. Look for the corresponding PID. -
Use the PID to kill the process:
kill <PID>
Replace
<PID>with the process ID ofstill-alive.
This project is licensed under the MIT License, allowing for free use, modification, and distribution under permissive terms.
To contribute, go to the contributing.md file. I will appreciate your efforts.