internal: refactor scheme

Also use a single file to store scheme data
This commit is contained in:
2 * r + 2 * t
2025-06-11 17:37:04 +10:00
parent a4f5138d41
commit dc855e1b01
6 changed files with 211 additions and 124 deletions
+13
View File
@@ -0,0 +1,13 @@
import os
from pathlib import Path
config_dir = Path(os.getenv("XDG_CONFIG_HOME", Path.home() / ".config"))
data_dir = Path(os.getenv("XDG_DATA_HOME", Path.home() / ".local/share"))
state_dir = Path(os.getenv("XDG_STATE_HOME", Path.home() / ".local/state"))
c_config_dir = config_dir / "caelestia"
c_data_dir = data_dir / "caelestia"
c_state_dir = state_dir / "caelestia"
scheme_path = c_state_dir / "scheme.json"
scheme_data_path = Path(__file__).parent.parent / "data/schemes"