From 5d4fb9d343b0bebd6fd56a1668fe2e8ebafc891d Mon Sep 17 00:00:00 2001 From: Don Williams Date: Tue, 6 Jan 2026 23:34:34 -0500 Subject: Adding small delay to allow wallust to finish same for WP select On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: hypr/scripts/ThemeChanger.sh --- config/hypr/scripts/ThemeChanger.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/config/hypr/scripts/ThemeChanger.sh b/config/hypr/scripts/ThemeChanger.sh index 0843fd69..1ae1060f 100755 --- a/config/hypr/scripts/ThemeChanger.sh +++ b/config/hypr/scripts/ThemeChanger.sh @@ -39,11 +39,19 @@ if wallust theme -- "${choice}"; then -h string:x-dunst-stack-tag:themechanger \ "Global theme changed" "Selected: ${choice}" - # Try to refresh Waybar automatically; ignore failures - if command -v waybar-msg >/dev/null 2>&1; then - waybar-msg cmd reload >/dev/null 2>&1 || true + # Give wallust a brief moment to finish writing templates + sleep 0.15 + + # Prefer the same refresh path used by WallpaperSelect to avoid CSS race/fallbacks + if [ -x "$HOME/.config/hypr/scripts/Refresh.sh" ]; then + "$HOME/.config/hypr/scripts/Refresh.sh" >/dev/null 2>&1 || true else - pkill -SIGUSR2 waybar >/dev/null 2>&1 || true + # Fallback: reload Waybar only + if command -v waybar-msg >/dev/null 2>&1; then + waybar-msg cmd reload >/dev/null 2>&1 || true + else + pkill -SIGUSR2 waybar >/dev/null 2>&1 || true + fi fi else have_notify && notify-send -u critical -a ThemeChanger \ -- cgit v1.2.3