From 04921eef62a2e57a2c6d8298c4e4b10e073ae5e0 Mon Sep 17 00:00:00 2001 From: Austin Farmer Date: Mon, 15 Dec 2025 17:16:46 -0500 Subject: [PATCH] Move Ghostty Application Theming (#1047) * Moved ghostty config First test. Seems to work but probably broke something. * Updated test --- core/internal/config/deployer.go | 8 +++++++- core/internal/config/deployer_test.go | 2 +- core/internal/config/embedded/ghostty.conf | 2 +- quickshell/matugen/configs/ghostty.toml | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/core/internal/config/deployer.go b/core/internal/config/deployer.go index 4b0eaa16..692ed4ea 100644 --- a/core/internal/config/deployer.go +++ b/core/internal/config/deployer.go @@ -265,7 +265,13 @@ func (cd *ConfigDeployer) deployGhosttyConfig() ([]DeploymentResult, error) { colorResult := DeploymentResult{ ConfigType: "Ghostty Colors", - Path: filepath.Join(os.Getenv("HOME"), ".config", "ghostty", "config-dankcolors"), + Path: filepath.Join(os.Getenv("HOME"), ".config", "ghostty", "themes", "dankcolors"), + } + + themesDir := filepath.Dir(colorResult.Path) + if err := os.MkdirAll(themesDir, 0755); err != nil { + mainResult.Error = fmt.Errorf("failed to create themes directory: %w", err) + return []DeploymentResult{mainResult}, mainResult.Error } if err := os.WriteFile(colorResult.Path, []byte(GhosttyColorConfig), 0644); err != nil { diff --git a/core/internal/config/deployer_test.go b/core/internal/config/deployer_test.go index 995673bc..c68f21b7 100644 --- a/core/internal/config/deployer_test.go +++ b/core/internal/config/deployer_test.go @@ -468,7 +468,7 @@ func TestHyprlandConfigStructure(t *testing.T) { func TestGhosttyConfigStructure(t *testing.T) { assert.Contains(t, GhosttyConfig, "window-decoration = false") assert.Contains(t, GhosttyConfig, "background-opacity = 1.0") - assert.Contains(t, GhosttyConfig, "config-file = ./config-dankcolors") + assert.Contains(t, GhosttyConfig, "theme = dankcolors") } func TestGhosttyColorConfigStructure(t *testing.T) { diff --git a/core/internal/config/embedded/ghostty.conf b/core/internal/config/embedded/ghostty.conf index f5412374..8ca05a29 100644 --- a/core/internal/config/embedded/ghostty.conf +++ b/core/internal/config/embedded/ghostty.conf @@ -48,4 +48,4 @@ keybind = shift+enter=text:\n gtk-single-instance = true # Dank color generation -config-file = ./config-dankcolors +theme = dankcolors diff --git a/quickshell/matugen/configs/ghostty.toml b/quickshell/matugen/configs/ghostty.toml index e1677d0a..4f15387f 100644 --- a/quickshell/matugen/configs/ghostty.toml +++ b/quickshell/matugen/configs/ghostty.toml @@ -1,3 +1,3 @@ [templates.dmsghostty] input_path = 'SHELL_DIR/matugen/templates/ghostty.conf' -output_path = '~/.config/ghostty/config-dankcolors' +output_path = '~/.config/ghostty/themes/dankcolors'