summaryrefslogtreecommitdiff
path: root/src/caelestia/utils/paths.py
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-11 17:37:04 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-11 17:37:04 +1000
commitdc855e1b01e9b4526927b8bd69daca733afd97c2 (patch)
tree38adb17eb316e92d70b64df6824d3ad91901028f /src/caelestia/utils/paths.py
parentparser: print help when no args (diff)
downloadcaelestia-cli-dc855e1b01e9b4526927b8bd69daca733afd97c2.tar.gz
caelestia-cli-dc855e1b01e9b4526927b8bd69daca733afd97c2.tar.bz2
caelestia-cli-dc855e1b01e9b4526927b8bd69daca733afd97c2.zip
internal: refactor scheme
Also use a single file to store scheme data
Diffstat (limited to 'src/caelestia/utils/paths.py')
-rw-r--r--src/caelestia/utils/paths.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/caelestia/utils/paths.py b/src/caelestia/utils/paths.py
new file mode 100644
index 0000000..aff6ea0
--- /dev/null
+++ b/src/caelestia/utils/paths.py
@@ -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"