feat: add various system and theme icons, configuration files, and support assets

This commit is contained in:
jschantli committed 2026-10-03 08:14:42 -07:00
1 parent 848dac4264
commit 54baea79f4
15893 files changed
+781426 -2

No files matched your search

@@ -0,0 +1,30 @@
"""settings.json — user preferences."""
from __future__ import annotations
from dataclasses import asdict, dataclass, fields
from pathlib import Path
from .util import atomic_write_json, read_json
LINK_MODES = ("symlink", "hardlink", "copy")
@dataclass
class Settings:
game_dir: str = "" # manual override; empty = auto-discover
link_mode: str = "symlink"
auto_deploy: bool = True # deploy on every checkbox toggle (Fluffy behaviour)
steam_user_id: str = "" # empty = first userdata dir
reframework_version: str = ""
@classmethod
def load(cls, path: Path) -> "Settings":
raw = read_json(path, {})
known = {f.name for f in fields(cls)}
s = cls(**{k: v for k, v in raw.items() if k in known}) if isinstance(raw, dict) else cls()
if s.link_mode not in LINK_MODES:
s.link_mode = "symlink"
return s
def save(self, path: Path) -> None:
atomic_write_json(path, asdict(self))