|
|
@ -1,11 +1,11 @@ |
|
|
|
from logger import logger |
|
|
|
from logger import logger |
|
|
|
from Xlib.display import Display |
|
|
|
from Xlib.display import Display |
|
|
|
|
|
|
|
|
|
|
|
saved_data: dict[str, int] |
|
|
|
saved_data: dict = {} |
|
|
|
saved = False |
|
|
|
saved = False |
|
|
|
available = False |
|
|
|
available = False |
|
|
|
|
|
|
|
|
|
|
|
display = None |
|
|
|
display: Display |
|
|
|
|
|
|
|
|
|
|
|
def init_display(): |
|
|
|
def init_display(): |
|
|
|
global display, available |
|
|
|
global display, available |
|
|
@ -20,6 +20,7 @@ def set_screensaver(timeout: int): |
|
|
|
if saved or not available: |
|
|
|
if saved or not available: |
|
|
|
return |
|
|
|
return |
|
|
|
display.sync() |
|
|
|
display.sync() |
|
|
|
|
|
|
|
display.sync() |
|
|
|
data: dict[str, int] = display.get_screen_saver()._data or {} |
|
|
|
data: dict[str, int] = display.get_screen_saver()._data or {} |
|
|
|
saved_data = data |
|
|
|
saved_data = data |
|
|
|
saved = True |
|
|
|
saved = True |
|
|
|