Skip to content

golang prevent windows from turnning off monitor and sleep

License

Notifications You must be signed in to change notification settings

mhbitarafan/go_wakelock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go_wakelock

prevent windows from turnning off monitor and sleep

minimum go version 1.18

Install

go get github.com/mhbitarafan/go_wakelock

Example

import wakelock "github.com/mhbitarafan/go_wakelock"

func main() {
	wakelock.EnableWakeLock() // prevent sleep and turn off monitor
	wakelock.EnableWakeLockSystem() // only prevent sleep
	wakelock.DisableWakeLock() // release wakelock
}

About

golang prevent windows from turnning off monitor and sleep

Topics

Resources

License

Stars

Watchers

Forks

Languages