summaryrefslogtreecommitdiff
path: root/src/caelestia
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-15 18:40:23 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-15 18:40:23 +1000
commit96e09c7bda446a0649dcc6bc4be7454a894f2fc8 (patch)
tree97a84149216a4caa7ab93761a89e34e5ab016e11 /src/caelestia
parentmaterial: fix colour generation (diff)
downloadcaelestia-cli-96e09c7bda446a0649dcc6bc4be7454a894f2fc8.tar.gz
caelestia-cli-96e09c7bda446a0649dcc6bc4be7454a894f2fc8.tar.bz2
caelestia-cli-96e09c7bda446a0649dcc6bc4be7454a894f2fc8.zip
theme: save sequences to state file
Diffstat (limited to 'src/caelestia')
-rw-r--r--src/caelestia/utils/theme.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/caelestia/utils/theme.py b/src/caelestia/utils/theme.py
index d205fb1..5e4ef83 100644
--- a/src/caelestia/utils/theme.py
+++ b/src/caelestia/utils/theme.py
@@ -2,7 +2,7 @@ import subprocess
import tempfile
from pathlib import Path
-from caelestia.utils.paths import config_dir, templates_dir
+from caelestia.utils.paths import c_state_dir, config_dir, templates_dir
def gen_conf(colours: dict[str, str]) -> str:
@@ -77,6 +77,10 @@ def try_write(path: Path, content: str) -> None:
def apply_terms(sequences: str) -> None:
+ state = c_state_dir / "sequences.txt"
+ state.parent.mkdir(parents=True, exist_ok=True)
+ state.write_text(sequences)
+
pts_path = Path("/dev/pts")
for pt in pts_path.iterdir():
if pt.name.isdigit():