|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
from Xlib import X |
|
|
|
|
from Xlib.display import Display |
|
|
|
|
from Xlib.error import DisplayError |
|
|
|
|
from logger import logger |
|
|
|
@ -52,4 +53,8 @@ class Screensaver:
|
|
|
|
|
self.saved = False |
|
|
|
|
logger.debug("Screensaver reset") |
|
|
|
|
|
|
|
|
|
def force_screensaver(self, value: bool): |
|
|
|
|
"""Force screensaver""" |
|
|
|
|
self.display.force_screen_saver(X.ScreenSaverActive if value else X.ScreenSaverReset) |
|
|
|
|
|
|
|
|
|
screensaver = Screensaver() |
|
|
|
|