From 09f01bfd1dfebea92c2931e617fbc634e03d2b2c Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Wed, 11 Jun 2025 21:59:23 +1000 Subject: feat: theme spicetify --- src/caelestia/utils/theme.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/caelestia/utils/theme.py') 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) -- cgit v1.2.3-freya