6 releases
0.2.4 | Mar 19, 2023 |
---|---|
0.2.3 | Oct 20, 2022 |
0.2.2 | Jun 7, 2022 |
0.2.1 | Apr 5, 2022 |
0.1.2 | Mar 4, 2022 |
#1369 in Command line utilities
63 downloads per month
40KB
928 lines
StayAwake
Introduction
StayAwake is a simple program for Windows & MacOS to keep your system awake without affecting your workflow.
Inspired by stay-awake package for Python.
As with the Python package the program is only triggered when you don't do any mouse movements and it is completely headless (it is intended to be used as a command line tool).
How does it work?
If in a span of 15 seconds you don't move your mouse, this program will automatically move your mouse for about 100 to 150 pixels randomly. There won't be any mouse displacement! If you are working, this will do absolutely nothing!
All settings like the time interval or the range of random mouse movement is fully customizable via environment variables or .env file.
Installation
You can download the latest version from Github Releases.
Alternatively, you can install it via cargo command:
cargo install stayawake
Configuration
The application ships with a default configuration. However, it can be overridden by creating .env file in the same location as the binary itself.
There are 6 available configuration properties:
RUST_LOG=INFO # logging level
STAYAWAKE_INTERVAL=15 # in seconds
JUMP_BY_PIXEL_MIN=100 # in pixels
JUMP_BY_PIXEL_MAX=150 # in pixels
INIT_POINT=0x0 # in pixels, starting point of the operating window area (usually it's a top-left corner of the screen; for example, 0x0)
WORKING_AREA=1024x768 # in pixels, operating window area (usually it's a display resolution; for example, 1024x768)
Dependencies
~7–16MB
~187K SLoC