diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-11 21:59:23 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-11 21:59:23 +1000 |
| commit | 09f01bfd1dfebea92c2931e617fbc634e03d2b2c (patch) | |
| tree | 746e53abef6a9dc69e7b05897c4d39caecef16c5 /src/caelestia/utils/theme.py | |
| parent | scheme: better error messages (diff) | |
| download | caelestia-cli-09f01bfd1dfebea92c2931e617fbc634e03d2b2c.tar.gz caelestia-cli-09f01bfd1dfebea92c2931e617fbc634e03d2b2c.tar.bz2 caelestia-cli-09f01bfd1dfebea92c2931e617fbc634e03d2b2c.zip | |
feat: theme spicetify
Diffstat (limited to '')
| -rw-r--r-- | src/caelestia/utils/theme.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/caelestia/utils/theme.py b/src/caelestia/utils/theme.py index 7940547..acca868 100644 --- a/src/caelestia/utils/theme.py +++ b/src/caelestia/utils/theme.py @@ -1,4 +1,3 @@ -import json import subprocess import tempfile from pathlib import Path @@ -91,7 +90,17 @@ def apply_discord(scss: str) -> None: try_write(config_dir / client / "themes/caelestia.theme.css", conf) +def apply_spicetify(colours: dict[str, str]) -> None: + template = (templates_dir / "spicetify.ini").read_text() + + for name, colour in colours.items(): + template = template.replace(f"${name}", colour) + + try_write(config_dir / "spicetify/Themes/caelestia/color.ini", template) + + def apply_colours(colours: dict[str, str]) -> None: apply_terms(gen_sequences(colours)) apply_hypr(gen_conf(colours)) apply_discord(gen_scss(colours)) + apply_spicetify(colours) |