Short little C# console app to keep the screen awake.
-
Setup a new console app in Visual Studio using a base template.
-
Copy the program.cs code into your program.cs file.
-
Compile it and run it in the prod release.
-
Make a shortcut to the .exe file and put it on your desktop or some other location that is easy to access.
-
As long as it is running, it will keep your screen saver away and other things active.
-
I made this with help from ChatGPT so it's not a huge secret. You can modify it to behave however you want fairly easily.
-
To make it a standalone app, execute the following on a terminal or command prompt:
-
dotnet publish -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true