some updates

This commit is contained in:
MoonDev
2025-05-23 01:55:25 +03:00
parent a775fe1c80
commit f1d8283224
18 changed files with 251 additions and 56 deletions

View File

@@ -1,5 +1,7 @@
import monitorcontrol
BRIGHTNESS = 10
def get_monitors():
"""Retrieve a list of connected monitors."""
return monitorcontrol.get_monitors()
@@ -13,9 +15,16 @@ def set_brightness(monitor, brightness):
print(f"Set brightness to {brightness}%")
def chenge_brightness(args):
def get_brightness(args):
global BRIGHTNESS
return {"value":BRIGHTNESS}
def change_brightness(args):
global BRIGHTNESS
try:
level = args.get('level', 10)
BRIGHTNESS = level
monitors = get_monitors()
if not monitors:
raise OSError(f"No DDC/CI compatible monitors found.")