=======
suspend.exe
======= 

Command-line power management utility (Vista/Win7/Win10)
 2020 Permetix

This utility very accurately controls the conditions under which your PC is allowed (or is forced to) enter the sleep mode.
It can watch out for a running process, an open window, a locked file, etc.
Suspend.exe works on its own: your PC's power options should be turned off to avoid conflicts.





============
suspend.ini
============

Suspend reads its settings from "suspend.ini" in the same folder as suspend.exe 
(see the included sample suspend.ini for usage)

[General]
----------------
IdleTime - idle time (min), after which your PC can enter sleep mode. Measured from last keystroke/mouse move. 
CPU - allowed CPU usage (%). CPU usage above this level will prevent sleep mode.
AudioCheck - good for watching movies: suspend checks if there's audio coming out of the sound card and prevents sleep mode
Process  - if this process is active, it will prevent sleep mode. Don't use ".exe" in the process name. You can list up to 4 processes.
FileExists - path to a file. If this file exists, it will prevent sleep mode
FileLock - path to a file. If this file is locked, it will prevent sleep mode. If you use a wildcard "*" (e.g. "C:\*.mpg"), suspend will check the most recent file that matches this pattern. List up to 4 files. 
Window - a window title. If this window is active (has focus), it will prevent sleep mode. Partial match is allowed at the beginning of the title, e.g. "-w Netflix" will match "Netflix - Film 1" and "Netflix - Film 2". List up to 4 window titles.

Execute - command to run before sleep (10 sec timeout)
TopProcess - if CPU usage is high enough to prevent sleep mode, log the most CPU-intensive processes (up to 5).

[Suspend]
command - command to execute just before suspension
prevent - if this file exists, the above command will NOT be executed

[Resume]
command - command to be executed if suspend detects that the PC has woken up from sleep

[TopProcess]
count - will list this many top most-busy processes preveting going to sleep mode




==========
suspend.log
==========

suspend's logs its activity in a file called suspend.log, in the same folder as suspend.exe.
