This might be of some interest to others in the community. This is meant to solve a small need but also show how far Swift has come on Windows.
I’ve put together a tiny program called vigil which is meant to be an equivalent to caffeinate for Windows. It is written purely in Swift. It currently supports two different forms of invocations:
vigil startthat can suspend the PM policies for a given interval or indefinitely.vigil -– …(or more explicitlyvigil stand -– …) which runs a given command whilst suspending the PM policies.
The source is available at GitHub - compnerd/vigil: A `caffeinate` inspired power management suspension program for Windows
Hopefully others will find this useful as well.