summaryrefslogtreecommitdiff
path: root/src/caelestia/utils
diff options
context:
space:
mode:
authorBatuhan Edgüer <67585935+BestSithInEU@users.noreply.github.com>2025-08-16 19:17:39 +0300
committerGitHub <noreply@github.com>2025-08-17 02:17:39 +1000
commit63e213283008d95832443a717e23cead25f0a7d6 (patch)
treedd716ccd2a954db0a929c5157f8abd23736bcd34 /src/caelestia/utils
parentpaths: fix custom path envs (diff)
downloadcaelestia-cli-63e213283008d95832443a717e23cead25f0a7d6.tar.gz
caelestia-cli-63e213283008d95832443a717e23cead25f0a7d6.tar.bz2
caelestia-cli-63e213283008d95832443a717e23cead25f0a7d6.zip
theme: add Warp terminal theme support (#42)
* theme: add Warp terminal theme support Add support for Warp terminal theming with proper template and integration. - Add warp.yaml template with standard theme variables - Implement apply_warp function with correct 'darker'/'lighter' values - Integrate with main theme application pipeline via enableWarp config * warp: improve theme generation and use proper data directory - Use gen_replace with hash=True for consistent color formatting - Remove # symbols from template to avoid double hashes - Replace warp_mode manually after gen_replace instead of adding to colors dict - Use data_dir for XDG-compliant theme location
Diffstat (limited to 'src/caelestia/utils')
-rw-r--r--src/caelestia/utils/theme.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/caelestia/utils/theme.py b/src/caelestia/utils/theme.py
index b3261d8..43c19eb 100644
--- a/src/caelestia/utils/theme.py
+++ b/src/caelestia/utils/theme.py
@@ -7,6 +7,7 @@ from caelestia.utils.colour import get_dynamic_colours
from caelestia.utils.paths import (
c_state_dir,
config_dir,
+ data_dir,
templates_dir,
theme_dir,
user_config_path,
@@ -184,6 +185,14 @@ general="Sans Serif,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
write_file(config_dir / f"qt{ver}ct/qt{ver}ct.conf", conf)
+def apply_warp(colours: dict[str, str], mode: str) -> None:
+ warp_mode = "darker" if mode == "dark" else "lighter"
+
+ template = gen_replace(colours, templates_dir / "warp.yaml", hash=True)
+ template = template.replace("{{ $warp_mode }}", warp_mode)
+ write_file(data_dir / "warp-terminal/themes/caelestia.yaml", template)
+
+
def apply_user_templates(colours: dict[str, str]) -> None:
if not user_templates_dir.is_dir():
return
@@ -219,4 +228,6 @@ def apply_colours(colours: dict[str, str], mode: str) -> None:
apply_gtk(colours, mode)
if check("enableQt"):
apply_qt(colours, mode)
+ if check("enableWarp"):
+ apply_warp(colours, mode)
apply_user_templates(colours)