Features:
Automatically shut off the console after a N-Minutes of inactivity.
It will listen for any Keyboard or Controller input.
Once activity is found, the app is paused of N-minutes.
Here's a gotcha, though. Windows requires permission to run the shutdown command. If you're running as admin, I think you're fine. If not you'll need to give your user permission...
Open the Local Security Policy editor by typing "secpol.msc" in the Start menu search box and pressing Enter.
In the Local Security Policy editor, navigate to Local Policies > User Rights Assignment.
In the right-hand pane, double-click the "Shut down the system" policy.
In the "Shut down the system Properties" window, click the "Add User or Group" button.
In the "Select Users or Groups" dialog box, type your user name in the "Enter the object names to select" field and click "Check Names" to confirm the user name.
Click OK to close the "Select Users or Groups" dialog box, and then click OK to close the "Shut down the system Properties" window.
Close the Local Security Policy editor.
Attached is the C++ Code and the compiled code.
Usage: `AutoSleep.exe <minutesAllowedInactive> <pauseMinutesBetweenActivity>`
Example usage: `AutoSleep.exe 120 45`
Everything should work out of the box, but I'm not normally writing C++ Code... or working within Windows for that matter. I welcome any changes or updates. I am placing this in beta and keeping it there.
AutoSleep.exe
autosleep.cpp