added ssh deploy

This commit is contained in:
2026-07-28 15:33:07 +03:00
parent 6644fd07c1
commit e7996a15ed
38 changed files with 18797 additions and 46 deletions
@@ -30,7 +30,7 @@ def config_path():
def _defaults():
return {
"version": 2,
"layout": {"mode": "grid", "columns": 2, "spacing": 10, "showLabels": True},
"layout": {"mode": "grid", "columns": 2, "spacing": 10, "showLabels": True, "labelColor": "#ffffff"},
"background": {
"type": "gradient",
"color1": "#00007b",
@@ -44,6 +44,9 @@ def _defaults():
"okWidth": 6,
"errorWidth": 6,
"glowRadius": 20,
"holdColor": "#ffffff",
"pendingColor": "#ffffff",
"pendingWidth": 6,
},
"settings": {
"darkMode": True,
@@ -71,6 +74,7 @@ def ensure_defaults(cfg):
sec.setdefault(k, v)
if not isinstance(cfg.get("buttons"), list):
cfg["buttons"] = []
cfg.setdefault("settings", {})["darkMode"] = True
return cfg
@@ -82,8 +86,11 @@ def load_config():
cfg["settings"]["iconsDir"] = str((p.parent.parent / "icons"))
return cfg
with p.open("r", encoding="utf-8") as f:
cfg = json.load(f)
return ensure_defaults(cfg)
raw = json.load(f)
migrated = ensure_defaults(raw if isinstance(raw, dict) else {})
if migrated != raw:
save_config(migrated)
return migrated
def save_config(cfg):