]> us-delaporte.pagekite.me Git - dotfiles.git/blobdiff - win/stay_awake.ps1
Stay awake for a bit.
[dotfiles.git] / win / stay_awake.ps1
index 7d40cfed9c0135c2a2d0bd52e50195138e98d65a..aba956ace00e78771b65bf33fb13606d4f996779 100644 (file)
@@ -1,9 +1,10 @@
 $wsh = New-Object -ComObject WScript.Shell
 $minutes = 15
 do{
-    $minutes-=1;
+       "Staying awake for $minutes minutes"
+  $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
+}until($minutes -lt 0)
+# Thank you to http://www.zhornsoftware.co.uk/caffeine/