{"id":16989715,"url":"https://github.com/nicofilips/keep-me-awake","last_synced_at":"2025-04-12T04:11:41.087Z","repository":{"id":219821218,"uuid":"749983609","full_name":"NicoFilips/keep-me-awake","owner":"NicoFilips","description":"Keep your PC awake ⚙️💻","archived":false,"fork":false,"pushed_at":"2024-12-01T20:35:46.000Z","size":13,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T02:01:07.596Z","etag":null,"topics":["automation","netcore","powershell7"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NicoFilips.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}},"created_at":"2024-01-29T19:12:14.000Z","updated_at":"2024-12-01T20:35:50.000Z","dependencies_parsed_at":"2024-02-12T10:47:22.649Z","dependency_job_id":null,"html_url":"https://github.com/NicoFilips/keep-me-awake","commit_stats":null,"previous_names":["nicofilips/keep-me-awake"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicoFilips%2Fkeep-me-awake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicoFilips%2Fkeep-me-awake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicoFilips%2Fkeep-me-awake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicoFilips%2Fkeep-me-awake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NicoFilips","download_url":"https://codeload.github.com/NicoFilips/keep-me-awake/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514207,"owners_count":21116903,"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","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":["automation","netcore","powershell7"],"created_at":"2024-10-14T03:07:39.652Z","updated_at":"2025-04-12T04:11:41.063Z","avatar_url":"https://github.com/NicoFilips.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://github.com/NicoFilips/keep-me-awake/\"\u003e\n  \u003cimg src=\"https://github.com/NicoFilips/keep-me-awake/assets/35654361/e3b2720d-a225-4528-8252-14b7faeb79e4\" alt=\"Logo\" width=\"200\" height=\"200\"\u003e\n\u003c/a\u003e\n  \n\u003cblockquote\u003e\n  \u003cp\u003eSource: DALL-E 3\u003c/p\u003e\n\u003c/blockquote\u003e\n\n# Keep-Me-Awake 🌟\n\n\u003c/div\u003e\n\n## Overview ✨\nThe Keep-Me-Awake script is a cross-platform PowerShell script designed to keep your computer awake by periodically simulating an input. This is especially useful for preventing your computer from entering sleep mode during extended periods of inactivity, such as during presentations (outside of PowerPoint), taking handwritten notes, or phone calls. Just because you're currently not focused on using your PC doesnt mean you want your PC automatically turn off your monitors. In a lot of cases, the energy settings are regulated by the companys domain, so this is a workaround to fix the issue.  🚀\n\n## PowerShell 7 and .NET Core 🌐\nPowerShell 7 is built on .NET Core, allowing it to run across multiple platforms including Windows, Linux, and macOS. This cross-platform capability ensures that scripts and modules work consistently across different operating systems. 🖥️💻🍏\n\n## Prerequisites 📋\nYou can edit the script to fit your documentations.\n\nPowerShell 7.0 or higher\nInstallation 🛠️\n\n# Windows 🪟\nInstall PowerShell 7:\n\nVisit the official PowerShell GitHub page.\nSelect the latest version for Windows and follow the installation instructions.\nClone the Repository (or download the files):\n\n´´´\ngit clone https://github.com/yourusername/keep-me-awake.git\n´´´\nNavigate to the Directory:\n\n´´´\ncd path/to/keep-me-awake\n´´´\n\nYou then can just easily create a new task in the windows taskmanager to run your script on startup. It can be run windowless so you don't even notice it anymore, but it still can be closed via your taskmanager\n\nTrigger: - On Startup -\nAction: Startup Program: \"C:\\Program Files\\WindowsApps\\Microsoft.PowerShell_7.x.x.x_x64__individual_Path_to_PowerShell7\\pwsh.exe\"\nArguments: -WindowStyle Hidden -ExecutionPolicy Bypass -File \"C:\\Program Files\\keep-alive\\keep-me-awake.ps1\" -Key \"F13\" -Interval 120\n\n# Linux 🐧\n\nInstall PowerShell 7:\nOpen a terminal window.\nExecute the following commands:\n\n´´´\nDownload the Microsoft repository GPG key\nwget -q \"https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb\"\n´´´\n\n´´´\nAdd the repository\nsudo dpkg -i packages-microsoft-prod.deb\n´´´\n\n´´´\nInstall PowerShell\nsudo apt-get update; sudo apt-get install -y powershell\n´´´\nClone the Repository (or download the files):\n\n´´´\ngit clone https://github.com/yourusername/keep-me-awake.git\n´´´\n\nNavigate to the Directory:\n\n```\nCopy code\ncd path/to/keep-me-awake\nUsage 🚀\nRun the Script:\nWith default values:\npowershell\nCopy code\npwsh ./keep-me-awake.ps1\nWith custom values:\npowershell\nCopy code\npwsh ./keep-me-awake.ps1 -Key \"F13\" -Interval 120\n```\n\n\n# Setting Up Automatic Execution\nTo ensure the Keep-Me-Awake script runs automatically at system startup, you can set it up in the Task Scheduler on Windows and as a Cron job on Linux.\n\n# Windows Task Scheduler 🪟\nOpen Task Scheduler:\n\nSearch for 'Task Scheduler' in the Start menu and open it.\nCreate a New Task:\n\nIn the Task Scheduler, go to Action \u003e Create Basic Task....\nTask Setup:\n\nGive your task a name, like KeepMeAwake.\nChoose When the computer starts as the trigger.\nSet the action to Start a program.\nConfigure Action:\n\nIn the Program/script field, enter C:\\Program Files\\PowerShell\\7\\pwsh.exe.\nIn the Add arguments field, enter -File \"C:\\Program Files\\keep-alive\\keep-me-alive.ps1\".\nEnsure the Start in field is left blank.\nFinish and Save:\n\nGo through the rest of the wizard and save your task.\n\n# Linux Cron Job 🐧\nOpen Terminal:\n\nOpen your Linux terminal.\nEdit Crontab File:\n\nEnter crontab -e to edit the crontab file.\nAdd Cron Job:\n\nAdd a new line to the end of the file:\narduino\nCopy code\n@reboot /usr/bin/pwsh -File \"/path/to/keep-me-alive.ps1\"\nReplace /path/to/keep-me-alive.ps1 with the actual path of the script.\nEnsure that the path to pwsh is correct (use which pwsh to find it).\nSave and Exit:\n\nSave the crontab file and exit the editor.\nBy setting up these tasks, the Keep-Me-Awake script will automatically start with your system, keeping your computer awake as per the script's configuration.\n\n## Support and Contributions 🤝\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request 🌟\n\n## License 📜\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicofilips%2Fkeep-me-awake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicofilips%2Fkeep-me-awake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicofilips%2Fkeep-me-awake/lists"}