diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-16 17:36:38 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-16 17:36:38 +1000 |
| commit | 3c1e9d87a6c7abecce38ff7e0081df4c7ca87898 (patch) | |
| tree | ab6137cacdaede294d60fcbf16798731a4bd7685 /src/caelestia/utils | |
| parent | toggle: source fish on btop startup (diff) | |
| download | caelestia-cli-3c1e9d87a6c7abecce38ff7e0081df4c7ca87898.tar.gz caelestia-cli-3c1e9d87a6c7abecce38ff7e0081df4c7ca87898.tar.bz2 caelestia-cli-3c1e9d87a6c7abecce38ff7e0081df4c7ca87898.zip | |
feat: theme qt
Diffstat (limited to 'src/caelestia/utils')
| -rw-r--r-- | src/caelestia/utils/theme.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/caelestia/utils/theme.py b/src/caelestia/utils/theme.py index f7fcf0f..95f83c6 100644 --- a/src/caelestia/utils/theme.py +++ b/src/caelestia/utils/theme.py @@ -125,6 +125,19 @@ def apply_gtk(colours: dict[str, str], mode: str) -> None: subprocess.run(["gsettings", "set", "org.gnome.desktop.interface", "icon-theme", f"Papirus-{mode.capitalize()}"]) +def apply_qt(colours: dict[str, str], mode: str) -> None: + template = gen_replace(colours, templates_dir / "qtcolors.conf", hash=True) + write_file(config_dir / "qt5ct/colors/caelestia.conf", template) + write_file(config_dir / "qt6ct/colors/caelestia.conf", template) + + qtct = (templates_dir / "qtct.conf").read_text() + qtct = qtct.replace("{{ $mode }}", mode.capitalize()) + + for ver in 5, 6: + conf = qtct.replace("{{ $config }}", str(config_dir / f"qt{ver}ct")) + write_file(config_dir / f"qt{ver}ct/qt{ver}ct.conf", conf) + + def apply_colours(colours: dict[str, str], mode: str) -> None: apply_terms(gen_sequences(colours)) apply_hypr(gen_conf(colours)) # FIXME: LAGGY @@ -133,3 +146,4 @@ def apply_colours(colours: dict[str, str], mode: str) -> None: apply_fuzzel(colours) apply_btop(colours) apply_gtk(colours, mode) + apply_qt(colours, mode) |