aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/Ghostty_themes.sh
diff options
context:
space:
mode:
authorDon Williams <don.e.williams@gmail.com>2026-07-22 02:44:02 -0400
committerPinapelz <yukais@pinapelz.com>2026-08-29 21:40:35 -0700
commit0d081f3aa56a0a137b1f00c83b1e7cb6dea79500 (patch)
treea07e7f6fb0fe034f4e5d41144e7f42caa81df377 /config/hypr/scripts/Ghostty_themes.sh
parent724c31c02cf8f6a46040fa17ce0b5902708bee2b (diff)
Moved default config kitty/ghostty to UserConfigs
Updated scripts and set eclusion in lua mgiration script to preseve them Signed-off-by: Don Williams <don.e.williams@gmail.com> On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: CHANGELOG.md modified: config/hypr/scripts/DarkLight.sh modified: config/hypr/scripts/Ghostty_themes.sh modified: config/hypr/scripts/Kitty_themes.sh modified: scripts/migrate-hypr-to-lua.sh
Diffstat (limited to 'config/hypr/scripts/Ghostty_themes.sh')
-rwxr-xr-xconfig/hypr/scripts/Ghostty_themes.sh24
1 files changed, 22 insertions, 2 deletions
diff --git a/config/hypr/scripts/Ghostty_themes.sh b/config/hypr/scripts/Ghostty_themes.sh
index 1b0e1f9e..cc9158a6 100755
--- a/config/hypr/scripts/Ghostty_themes.sh
+++ b/config/hypr/scripts/Ghostty_themes.sh
@@ -7,7 +7,9 @@
# ==================================================
# Ghostty theme selector
-config_file="${XDG_CONFIG_HOME:-$HOME/.config}/ghostty/config"
+user_ghostty_config="${XDG_CONFIG_HOME:-$HOME/.config}/hypr/UserConfigs/ghostty.conf"
+fallback_ghostty_config="${XDG_CONFIG_HOME:-$HOME/.config}/ghostty/config"
+config_file="$user_ghostty_config"
iDIR="${XDG_CONFIG_HOME:-$HOME/.config}/swaync/images"
rofi_theme_primary="${XDG_CONFIG_HOME:-$HOME/.config}/rofi/config-ghostty-theme.rasi"
rofi_theme_fallback="${XDG_CONFIG_HOME:-$HOME/.config}/rofi/config-edit.rasi"
@@ -33,8 +35,26 @@ refresh_wallpaper_theme() {
fi
pkill -SIGUSR2 ghostty >/dev/null 2>&1 || true
}
+ensure_managed_ghostty_config() {
+ if [[ -f "$user_ghostty_config" && -r "$user_ghostty_config" ]]; then
+ config_file="$user_ghostty_config"
+ return 0
+ fi
+
+ if [[ -r "$fallback_ghostty_config" ]]; then
+ mkdir -p "$(dirname "$user_ghostty_config")" 2>/dev/null || true
+ cp -f "$fallback_ghostty_config" "$user_ghostty_config" 2>/dev/null || true
+ if [[ -f "$user_ghostty_config" && -r "$user_ghostty_config" ]]; then
+ config_file="$user_ghostty_config"
+ return 0
+ fi
+ fi
+
+ config_file="$fallback_ghostty_config"
+}
-if [[ ! -f "$config_file" ]]; then
+ensure_managed_ghostty_config
+if [[ ! -f "$config_file" || ! -r "$config_file" ]]; then
notify_user "$iDIR/error.png" "Ghostty Theme" "Config not found: $config_file"
exit 1
fi
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage