+
Skip to content

Lvl4Sword/LockDetect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

LockDetect

Program used to detect if the lockscreen / screensaver is active on Linux, Mac, and Windows.

Mac setup:

Requires pip install pyobjc-framework-Quartz

How do I use it?:

from lockdetect import locked
locked()

The above will either return with False, True, or a None / reason tuple.

You can also do one of the following if you're running Linux and know the exact command from the SCREENSAVERS dictionary:

from lockdetect import locked
locked('FREEDESKTOP_SCREENSAVER')
from lockdetect import locked
locked('GNOME_SCREENSAVER')
from lockdetect import locked
locked('GNOME3_SCREENSAVER')
from lockdetect import locked
locked('KDE_SCREENSAVER')

About

Detect if the lockscreen / screensaver is active on Linux, Mac, and Windows.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载