"""Shared filesystem locations. Works whether run from the repo or ~/.config.""" from __future__ import annotations import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent STYLE_DIR = BASE_DIR / "style" SCRIPTS_DIR = Path.home() / "Documents" / "Scripts" # User settings live under XDG_STATE_HOME, NOT ~/.config — config-updater does # `rm -rf ~/.config/orbit-menu` on every dotfiles sync (see astal-menu/paths.py # for the same rationale), which would wipe a hand-edited config on the spot. STATE_DIR = Path(os.environ.get("XDG_STATE_HOME", Path.home() / ".local" / "state")) / "orbit-menu" CONFIG_FILE = STATE_DIR / "config.json" APP_ID = "eu.abdelbaki.orbitmenu" def ensure_dirs() -> None: STATE_DIR.mkdir(parents=True, exist_ok=True)