From 0d081f3aa56a0a137b1f00c83b1e7cb6dea79500 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 22 Jul 2026 02:44:02 -0400 Subject: Moved default config kitty/ghostty to UserConfigs Updated scripts and set eclusion in lua mgiration script to preseve them Signed-off-by: Don Williams 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 --- config/hypr/scripts/Ghostty_themes.sh | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'config/hypr/scripts/Ghostty_themes.sh') 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 -- cgit v1.2.3