From d88cc7ff793e7c66ba20465f81791990d7d3d151 Mon Sep 17 00:00:00 2001 From: Nathachou <83581717+HANTALE-59@users.noreply.github.com> Date: Tue, 17 Feb 2026 01:36:42 +0100 Subject: [PATCH] feat: scheme support for Pandora Minecraft launcher (#87) * added pandora theme template json * feat: add support for Pandora theme integration --- src/caelestia/data/templates/pandora.json | 162 ++++++++++++++++++++++ src/caelestia/utils/theme.py | 8 ++ 2 files changed, 170 insertions(+) create mode 100644 src/caelestia/data/templates/pandora.json diff --git a/src/caelestia/data/templates/pandora.json b/src/caelestia/data/templates/pandora.json new file mode 100644 index 0000000..c105c48 --- /dev/null +++ b/src/caelestia/data/templates/pandora.json @@ -0,0 +1,162 @@ +{ + "$schema": "https://github.com/longbridge/gpui-component/raw/refs/heads/main/.theme-schema.json", + "name": "Caelestia", + "author": "Unrectified", + "url": "https://github.com/caelestia-dots/cli", + "themes": [ + { + "name": "Caelestia", + "mode": "{{ $mode }}", + "colors": { + "accent.background": "{{ $surfaceContainerHigh }}", + "accent.foreground": "{{ $onSurface }}", + "background": "{{ $background }}", + "border": "{{ $outlineVariant }}", + "danger.background": "{{ $error }}", + "foreground": "{{ $onBackground }}", + "input.border": "{{ $outline }}", + "link.active.foreground": "{{ $primary }}", + "link.foreground": "{{ $primary }}", + "link.hover.foreground": "{{ $primaryFixed }}", + "list.active.background": "{{ $secondaryContainer }}", + "list.active.border": "{{ $secondary }}", + "list.even.background": "{{ $surfaceContainerLowest }}", + "muted.background": "{{ $surfaceVariant }}", + "muted.foreground": "{{ $onSurfaceVariant }}", + "panel.background": "{{ $surfaceContainer }}", + "popover.background": "{{ $surfaceContainerHigh }}", + "popover.foreground": "{{ $onSurface }}", + "primary.active.background": "{{ $primaryFixedDim }}", + "primary.background": "{{ $primary }}", + "primary.foreground": "{{ $onPrimary }}", + "primary.hover.background": "{{ $primaryFixed }}", + "scrollbar.background": "{{ $surface }}", + "scrollbar.thumb.background": "{{ $outline }}", + "secondary.background": "{{ $secondaryContainer }}", + "secondary.active.background": "{{ $secondaryFixedDim }}", + "secondary.foreground": "{{ $onSecondary }}", + "secondary.hover.background": "{{ $secondaryFixed }}", + "tab.active.background": "{{ $surface }}", + "tab.active.foreground": "{{ $onSurface }}", + "tab.background": "{{ $surfaceContainerLowest }}", + "tab.foreground": "{{ $onSurfaceVariant }}", + "tab_bar.background": "{{ $surface }}", + "table.background": "{{ $surfaceContainer }}", + "table.head.foreground": "{{ $onSurfaceVariant }}", + "table.row.border": "{{ $outlineVariant }}", + "title_bar.background": "{{ $surfaceDim }}", + "ring": "{{ $primary }}", + "base.red": "{{ $red }}", + "base.red.light": "{{ $peach }}", + "base.green": "{{ $green }}", + "base.green.light": "{{ $teal }}", + "base.blue": "{{ $blue }}", + "base.blue.light": "{{ $sky }}", + "base.cyan": "{{ $teal }}", + "base.cyan.light": "{{ $sky }}", + "base.magenta": "{{ $mauve }}", + "base.magenta.light": "{{ $pink }}", + "base.yellow": "{{ $yellow }}", + "base.yellow.light": "{{ $peach }}" + }, + "highlight": { + "editor.foreground": "{{ $onSurface }}", + "editor.background": "{{ $surface }}", + "editor.active_line.background": "{{ $surfaceContainerLow }}", + "editor.line_number": "{{ $onSurfaceVariant }}", + "editor.active_line_number": "{{ $onSurface }}", + "editor.invisible": "{{ $outlineVariant }}", + "conflict": "{{ $red }}", + "created": "{{ $green }}", + "deleted": "{{ $red }}", + "error": "{{ $error }}", + "hidden": "{{ $outline }}", + "hint": "{{ $success }}", + "ignored": "{{ $outline }}", + "info": "{{ $blue }}", + "modified": "{{ $yellow }}", + "predictive": "{{ $overlay1 }}", + "renamed": "{{ $green }}", + "success": "{{ $success }}", + "unreachable": "{{ $outlineVariant }}", + "warning": "{{ $yellow }}", + "syntax": { + "attribute": { + "color": "{{ $yellow }}" + }, + "boolean": { + "color": "{{ $green }}" + }, + "comment": { + "color": "{{ $subtext0 }}", + "font_style": "italic" + }, + "comment.doc": { + "color": "{{ $subtext0 }}", + "font_style": "italic" + }, + "constant": { + "color": "{{ $red }}" + }, + "constructor": { + "color": "{{ $yellow }}" + }, + "embedded": { + "color": "{{ $onSurface }}" + }, + "function": { + "color": "{{ $green }}" + }, + "keyword": { + "color": "{{ $mauve }}" + }, + "link_text": { + "color": "{{ $sky }}", + "font_style": "normal" + }, + "link_uri": { + "color": "{{ $klink }}", + "font_style": "italic" + }, + "number": { + "color": "{{ $red }}" + }, + "string": { + "color": "{{ $green }}" + }, + "string.escape": { + "color": "{{ $green }}" + }, + "string.regex": { + "color": "{{ $green }}" + }, + "string.special": { + "color": "{{ $yellow }}" + }, + "string.special.symbol": { + "color": "{{ $yellow }}" + }, + "tag": { + "color": "{{ $yellow }}" + }, + "text.literal": { + "color": "{{ $red }}" + }, + "title": { + "color": "{{ $sky }}", + "font_weight": 600 + }, + "type": { + "color": "{{ $yellow }}" + }, + "property": { + "color": "{{ $onSurface }}" + }, + "variable.special": { + "color": "{{ $red }}" + } + } + } + } + ] +} diff --git a/src/caelestia/utils/theme.py b/src/caelestia/utils/theme.py index dc4db62..7d17433 100644 --- a/src/caelestia/utils/theme.py +++ b/src/caelestia/utils/theme.py @@ -155,6 +155,12 @@ def apply_discord(scss: str) -> None: for client in "Equicord", "Vencord", "BetterDiscord", "equibop", "vesktop", "legcord": write_file(config_dir / client / "themes/caelestia.theme.css", conf) +@log_exception +def apply_pandora(colours: dict[str, str], mode: str) -> None: + template = gen_replace(colours, templates_dir / "pandora.json", hash=True) + template = template.replace("{{ $mode }}", mode) + write_file(data_dir / "PandoraLauncher/themes/caelestia.json", template) + @log_exception def apply_spicetify(colours: dict[str, str], mode: str) -> None: @@ -396,6 +402,8 @@ def apply_colours(colours: dict[str, str], mode: str) -> None: apply_discord(gen_scss(colours)) if check("enableSpicetify"): apply_spicetify(colours, mode) + if check("enablePandora"): + apply_pandora(colours, mode) if check("enableFuzzel"): apply_fuzzel(colours) if check("enableBtop"):