diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-24 23:47:53 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-24 23:47:53 +1000 |
| commit | f47b4fe661634a0c4c5c3efda56207e7796a3957 (patch) | |
| tree | a3d55d6ed318c477983c6b07f080bfb7864f7834 /src/caelestia/utils/theme.py | |
| parent | internal: lazy import stuff (diff) | |
| download | caelestia-cli-f47b4fe661634a0c4c5c3efda56207e7796a3957.tar.gz caelestia-cli-f47b4fe661634a0c4c5c3efda56207e7796a3957.tar.bz2 caelestia-cli-f47b4fe661634a0c4c5c3efda56207e7796a3957.zip | |
internal: more lazy importing
Also fix some stuff with scheme checking
Diffstat (limited to 'src/caelestia/utils/theme.py')
| -rw-r--r-- | src/caelestia/utils/theme.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/caelestia/utils/theme.py b/src/caelestia/utils/theme.py index 2e5521e..8897fa9 100644 --- a/src/caelestia/utils/theme.py +++ b/src/caelestia/utils/theme.py @@ -1,5 +1,4 @@ import subprocess -import tempfile from pathlib import Path from caelestia.utils.paths import c_state_dir, config_dir, templates_dir @@ -91,6 +90,8 @@ def apply_hypr(conf: str) -> None: def apply_discord(scss: str) -> None: + import tempfile + with tempfile.TemporaryDirectory("w") as tmp_dir: (Path(tmp_dir) / "_colours.scss").write_text(scss) conf = subprocess.check_output(["sass", "-I", tmp_dir, templates_dir / "discord.scss"], text=True) @@ -140,7 +141,7 @@ def apply_qt(colours: dict[str, str], mode: str) -> None: def apply_colours(colours: dict[str, str], mode: str) -> None: apply_terms(gen_sequences(colours)) - apply_hypr(gen_conf(colours)) # FIXME: LAGGY + apply_hypr(gen_conf(colours)) apply_discord(gen_scss(colours)) apply_spicetify(colours, mode) apply_fuzzel(colours) |