Git Product home page Git Product logo

awake's Introduction

awake

prevent the system from entering sleep or turning off the display

Background and Information

This simple windows app keeps a machine/workstation from going idle. Oriignally this application pressed the Scroll Lock button twice every second to keep windows "awake". The recent version now uses a native windows call "ES_DISPLAY_REQUIRED" to keep the display on instead.

I built this tool to solve a problem, learn about tkinter, pyautogui and python threading. Displaying a basic GUI while a second thread takes care of the automation. Whilst the latest version is much more efficient/compact, you can still see that code in as recent as the v0.4.0 tag.

Usage

The App starts in the system tray (with the Z icon).

Running in the system tray

A right-click context menu allows you to "Start/Pause" the program (pausing will allow windows to sleep again, this is represented by โธ icon) or "Quit" and close the application.

Start/Pause and Quit Menu while Paused

Development

Python venv and pip

# create a venv named venv
py -m venv venv

# run venv
venv/Scripts/Activate.ps1

# install pip prereqs
py -m pip install -r .\requirements.txt --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org

# list pip installs inside the venv
pip freeze

Compile

# compile manually
pyinstaller 'src/awake.spec' --noconfirm

package with nsis manually
makensis 'installer/awake.nsi'

# run both automatically
py 'tools/make.py'

Further Reading

Useful Links

Contributing to this Project

This project welcomes contributions of all types. We ask that before you start work on a feature that you would like to contribute, please read the Contributor's Guide.

Security Policy for this Project

This project seeks to build secure, versatile and robust portable software. If you find an issue, please report it following the Security Policy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.