Skip to main content

A Command-line tool that moves the mouse slightly at regular intervals

Project description

Still Alive

GitHub PyPI

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.

Features

  • 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.

Installation

To install the package via pip, use the following command:

pip install still-alive

This will install the still-alive package, making it available as a command-line tool on your system.

Usage

The tool provides flexible options to control the start and end times of the mouse movements, as well as the interval between movements.

Command-Line Arguments:

Still Alive offers several command-line arguments to configure its behavior:

  • --start-duration / -sd: Start time in minutes from the current time. Defaults to 0, 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 to 60 minutes, meaning the execution will run for 1 hour.
  • --start-time / -st: Start time in HH: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-duration is not provided, the execution will default to 1 hour.
  • --interval / -i: Interval between mouse movements, in seconds. The default is 50 seconds, but you can set any interval that fits your needs.

How It Works

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.

Example Usage

  • 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
    

Important Notes

  • You should specify either the end-time (-et) or end-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 by start-duration (-sd).
  • If you provide both start-time (-st) and start-duration (-sd), then start-time (-st) takes precedence.
  • If you provide both end-time (-et) and end-duration (-ed), then end-time (-et) takes precedence.

Running in the Background

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.

Killing the Process

If you've started Still Alive as a background process and want to stop it, follow these steps:

  1. Find the process ID (PID):

    ps -aux | grep still-alive
    

    This will list the active processes, including still-alive. Look for the corresponding PID.

  2. Use the PID to kill the process:

    kill <PID>
    

    Replace <PID> with the process ID of still-alive.

LICENSE

This project is licensed under the MIT License, allowing for free use, modification, and distribution under permissive terms.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

still_alive-1.1.1.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

still_alive-1.1.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file still_alive-1.1.1.tar.gz.

File metadata

  • Download URL: still_alive-1.1.1.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.8

File hashes

Hashes for still_alive-1.1.1.tar.gz
Algorithm Hash digest
SHA256 0f763048d871f519dbe3f8f74e6677fa3a17640997c08a5a76bade63b7086925
MD5 051271cf04414165be5dd932e032e42a
BLAKE2b-256 b73e0b02432a642b0c9cd2946b436eb69515f3e5a0f0f1ebe4d9309c4ed87040

See more details on using hashes here.

File details

Details for the file still_alive-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: still_alive-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.8

File hashes

Hashes for still_alive-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fd797cee8471f21113ad80a94e7b3708e81fe99f8001763e815e821346f8a9a0
MD5 61fdbb47a3e927b66848ca0d4cd890be
BLAKE2b-256 f307d66e409305448e8643cd1608a04b576338346b391836bec4a51b16737ee8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page