aboutsummaryrefslogtreecommitdiffstats
path: root/deckit
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-10 19:50:49 +0100
committerDanilo M. <danix@danix.xyz>2026-11-10 19:50:49 +0100
commit2ba4e3d3ea64081904677896d7a8dc1faa3ac912 (patch)
tree675e29227ca77ebc7bbc23e7959a10ed992f124c /deckit
parent6c7f59dbff8937210106bafd8a261284dcd33662 (diff)
downloaddeck-it-2ba4e3d3ea64081904677896d7a8dc1faa3ac912.tar.gz
deck-it-2ba4e3d3ea64081904677896d7a8dc1faa3ac912.zip
feat(config): the dashboard's action list
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'deckit')
-rw-r--r--deckit/config.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/deckit/config.py b/deckit/config.py
index e20bc00..6ce0cba 100644
--- a/deckit/config.py
+++ b/deckit/config.py
@@ -26,6 +26,8 @@ ROOT = Path(__file__).resolve().parent.parent
MONITOR_NAME = re.compile(r"[A-Za-z0-9_-]{1,32}")
WIFI_ADDR = re.compile(r"[A-Za-z0-9.-]{1,253}:[0-9]{1,5}")
DESKTOP_ID = re.compile(r"[A-Za-z0-9._-]{1,255}")
+# The dashboard's action buttons; deckit/modules/actions.py maps each to its command.
+ACTION_IDS = ("screenshot", "lock")
def user_config_path() -> Path:
@@ -54,6 +56,9 @@ def config_error(cfg: dict) -> str | None:
apps = cfg.get("launch", {}).get("apps", [])
if not isinstance(apps, list) or not all(isinstance(a, str) and DESKTOP_ID.fullmatch(a) for a in apps):
return "launch.apps must be a list of desktop ids, like \"kitty\""
+ acts = cfg.get("dashboard", {}).get("actions", [])
+ if not isinstance(acts, list) or not all(a in ACTION_IDS for a in acts):
+ return f"dashboard.actions must be a list of: {', '.join(ACTION_IDS)}"
return None