From 7e057020a428ba234e1557d17d26ec28fedb250f Mon Sep 17 00:00:00 2001 From: Don Williams Date: Thu, 8 Jan 2026 00:36:12 -0500 Subject: Adding reload config to ghostty on theme/wallpaper change On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: config/hypr/scripts/ThemeChanger.sh modified: config/hypr/scripts/WallustSwww.sh --- config/hypr/scripts/ThemeChanger.sh | 5 +++++ config/hypr/scripts/WallustSwww.sh | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/config/hypr/scripts/ThemeChanger.sh b/config/hypr/scripts/ThemeChanger.sh index b42ec8da..4c814f2c 100755 --- a/config/hypr/scripts/ThemeChanger.sh +++ b/config/hypr/scripts/ThemeChanger.sh @@ -126,6 +126,11 @@ if wallust theme -- "${choice}"; then if pidof kitty >/dev/null; then for pid in $(pidof kitty); do kill -SIGUSR1 "$pid" 2>/dev/null || true; done fi + + # Ask ghostty to reload its config so the updated wallust.conf is applied + if pidof ghostty >/dev/null; then + for pid in $(pidof ghostty); do kill -SIGUSR2 "$pid" 2>/dev/null || true; done + fi else have_notify && notify-send -u critical -a ThemeChanger \ -h string:x-dunst-stack-tag:themechanger \ diff --git a/config/hypr/scripts/WallustSwww.sh b/config/hypr/scripts/WallustSwww.sh index 421b84f8..d1e53400 100755 --- a/config/hypr/scripts/WallustSwww.sh +++ b/config/hypr/scripts/WallustSwww.sh @@ -66,3 +66,12 @@ wallust run -s "$wallpaper_path" || true if [ -f "$HOME/.config/ghostty/wallust.conf" ]; then sed -i -E 's/^(\s*palette\s*=\s*)([0-9]{1,2}):/\1\2=/' "$HOME/.config/ghostty/wallust.conf" 2>/dev/null || true fi + +# Light wait for Ghostty colors file to be present then signal Ghostty to reload (SIGUSR2) +for _ in 1 2 3; do + [ -s "$HOME/.config/ghostty/wallust.conf" ] && break + sleep 0.1 +done +if pidof ghostty >/dev/null; then + for pid in $(pidof ghostty); do kill -SIGUSR2 "$pid" 2>/dev/null || true; done +fi -- cgit v1.2.3