#desktop #mouse #awake #windows #macos

app stayawake

StayAwake is a simple program for Windows & MacOS to keep your system awake without affecting your workflow. Inspired by "stay-awake" package for Python.

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

#527 in Command line utilities

Download history 1/week @ 2023-11-03 10/week @ 2023-11-10 5/week @ 2023-11-17 18/week @ 2023-11-24 8/week @ 2023-12-01 13/week @ 2023-12-08 12/week @ 2023-12-22 1/week @ 2023-12-29 6/week @ 2024-01-05 4/week @ 2024-01-19 6/week @ 2024-01-26 6/week @ 2024-02-02 9/week @ 2024-02-09 73/week @ 2024-02-16

94 downloads per month

MIT license

40KB
928 lines

StayAwake logo

CI codecov crates.io license

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–11MB
~188K SLoC