]> apps.delaporte.us Git - dotfiles.git/blob - psmodules/stay_awake.psm1
Update config
[dotfiles.git] / psmodules / stay_awake.psm1
1 param($minutes=90)
2 $wsh = New-Object -ComObject WScript.Shell
3 do{
4 "Staying awake for $minutes minutes"
5 $minutes-=1;
6 # Send Shift+F15
7 $wsh.SendKeys('+{F15}')
8 Start-Sleep -seconds 59
9 }until($minutes -lt 0)
10 # Thank you to http://www.zhornsoftware.co.uk/caffeine/