From: Edward Delaporte Date: Fri, 29 Oct 2021 02:53:07 +0000 (+0100) Subject: stay awake X-Git-Url: https://us-delaporte.pagekite.me/gitweb/dotfiles.git/commitdiff_plain/c656b6f73876cfbfa323bdc06e08d87e6089c1e6 stay awake --- diff --git a/win/stay_awake.ps1 b/win/stay_awake.ps1 new file mode 100644 index 0000000..7d40cfe --- /dev/null +++ b/win/stay_awake.ps1 @@ -0,0 +1,9 @@ +$wsh = New-Object -ComObject WScript.Shell +$minutes = 15 +do{ + $minutes-=1; + # Send Shift+F15 + $wsh.SendKeys('+{F15}') + Start-Sleep -seconds 59 +}until($minutes < 0) +# Thank you to http://www.zhornsoftware.co.uk/caffeine/ \ No newline at end of file