{"id":31721297,"url":"https://github.com/cumulus13/keepon","last_synced_at":"2025-10-09T03:46:12.937Z","repository":{"id":293848307,"uuid":"968994484","full_name":"cumulus13/keepon","owner":"cumulus13","description":"prevents your computer from going to sleep or turning off the display","archived":false,"fork":false,"pushed_at":"2025-05-17T13:39:08.000Z","size":149,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-17T14:35:40.147Z","etag":null,"topics":["prevent","python","sleep"],"latest_commit_sha":null,"homepage":"https://github.com/cumulus13/keepon","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cumulus13.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-19T06:25:57.000Z","updated_at":"2025-05-17T13:39:12.000Z","dependencies_parsed_at":"2025-05-17T14:35:44.956Z","dependency_job_id":"db05190d-bc9d-4d74-8489-0200c5722b81","html_url":"https://github.com/cumulus13/keepon","commit_stats":null,"previous_names":["cumulus13/keepon"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/cumulus13/keepon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cumulus13%2Fkeepon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cumulus13%2Fkeepon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cumulus13%2Fkeepon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cumulus13%2Fkeepon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cumulus13","download_url":"https://codeload.github.com/cumulus13/keepon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cumulus13%2Fkeepon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000703,"owners_count":26082911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["prevent","python","sleep"],"created_at":"2025-10-09T03:46:11.973Z","updated_at":"2025-10-09T03:46:12.931Z","avatar_url":"https://github.com/cumulus13.png","language":"Python","funding_links":["https://www.buymeacoffee.com/cumulus13","https://ko-fi.com/cumulus13","https://www.patreon.com/cumulus13"],"categories":[],"sub_categories":[],"readme":"# KeepOn GUI\n\nKeepOn GUI is a Python application that prevents your computer from going to sleep or turning off the display. It runs as a system tray application, allowing you to easily start or stop the sleep prevention functionality.\n\n## Features\n\n- Prevents the system from sleeping or turning off the display.\n- Runs in the system tray for easy access.\n- Start, stop, or exit the application via a context menu.\n- Notifications to indicate the current status of the sleep prevention.\n\n## Requirements (*.py)\n\n- Python 3.x \n- PyQt5\n\n## Installation\n\n1. Clone or download this repository.\n2. Install the required dependencies using pip:\n\n   ```sh\n   pip install PyQt5\n   ```\n\n3. Run the application:\n\n   ```sh\n   #gui app\n   python keepon-gui.py\n   #or console app\n   python keepon.py\n   #or you can run file *.exe\n   keepon.exe\n   ```\n\n## Usage\n\n1. When the application starts, it will appear in the system tray with a heart icon.\n2. Right-click the tray icon to open the context menu.\n3. Use the following options:\n   - **Start**: Start preventing the system from sleeping.\n   - **Stop**: Stop the sleep prevention and allow the system to sleep normally.\n   - **Exit**: Exit the application and restore the system's default sleep behavior.\n\n## File Structure\n\n- `keepon-gui.py`: The main script for the GUI application.\n- `keepon.py`: The main script for the console application.\n- `icons/`: Contains the icons used for the system tray and menu actions.\n  - `heart.ico`: Default tray icon.\n  - `start.ico`: Icon for the \"Start\" action.\n  - `stop.ico`: Icon for the \"Stop\" action.\n  - `exit.ico`: Icon for the \"Exit\" action.\n\n## How It Works\n\nThe application uses the Windows API to prevent the system from sleeping by calling `SetThreadExecutionState` with specific flags:\n\n- `ES_CONTINUOUS`: Ensures the state is maintained until explicitly changed.\n- `ES_SYSTEM_REQUIRED`: Prevents the system from sleeping.\n- `ES_DISPLAY_REQUIRED`: Prevents the display from turning off.\n\nA background thread (`SleepPreventer`) periodically updates the state every 30 seconds to ensure the system remains awake.\n\n## License\n\nThis project is licensed under the MIT License.\n\n\n## Author\n[Hadi Cahyadi](mailto:cumulus13@gmail.com)\n    \n\n## Coffee\n[![Buy Me a Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/cumulus13)\n\n[![Donate via Ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/cumulus13)\n\n[Support me on Patreon](https://www.patreon.com/cumulus13)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcumulus13%2Fkeepon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcumulus13%2Fkeepon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcumulus13%2Fkeepon/lists"}