- Add ManagedTimer to replace repeated source_remove/timeout_add boilerplate - Add EvdevLockService base class for numlock/capslock (cut 154→28 lines) - Add BaseNotchIndicator for 5 near-identical indicator classes (cut 404→171 lines) - Add load_pixbuf_thumbnail and resolve_monitor to utils - Delete screencapture.py facade; callers use Screenshot/ScreenRecorder directly
18 lines
425 B
Python
18 lines
425 B
Python
from utils.evdev_lock import EvdevLockService
|
|
|
|
|
|
class CapsLock(EvdevLockService):
|
|
"""Service for monitoring CapsLock LED state via evdev."""
|
|
|
|
_LED_GLOB = "input*::capslock"
|
|
_LED_INDEX = 1 # LED_CAPSL
|
|
_SERVICE_NAME = "CapsLock"
|
|
|
|
_instance = None
|
|
|
|
@staticmethod
|
|
def get_initial():
|
|
if CapsLock._instance is None:
|
|
CapsLock._instance = CapsLock()
|
|
return CapsLock._instance
|