"""Tiny user-editable config file: ~/.local/state/mnotifhist/config.json. Read once at startup (main.py); a change takes effect on the next mnotifhist-start.sh restart, not live. Same pattern as orbit-menu/ horizon-dock/astro-menu/station-bar/mnotifd's config.py. """ from __future__ import annotations import json from paths import CONFIG_FILE, ensure_dirs _DEFAULTS = {"hologram": False} def _load() -> dict: try: data = json.loads(CONFIG_FILE.read_text()) except (FileNotFoundError, json.JSONDecodeError): data = {} merged = {**_DEFAULTS, **data} if not CONFIG_FILE.exists(): ensure_dirs() CONFIG_FILE.write_text(json.dumps(merged, indent=2) + "\n") return merged def hologram_enabled() -> bool: return bool(_load().get("hologram", True))