diff options
| author | Don Williams <don.e.williams@gmail.com> | 2026-01-06 23:34:34 -0500 |
|---|---|---|
| committer | Don Williams <don.e.williams@gmail.com> | 2026-01-06 23:34:34 -0500 |
| commit | 5d4fb9d343b0bebd6fd56a1668fe2e8ebafc891d (patch) | |
| tree | 3ab9ba0596e8f32895ae39dbd14aaf597bf4239e | |
| parent | eb31d00157e0f13687e26caaf87600e241d350b4 (diff) | |
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
| -rwxr-xr-x | config/hypr/scripts/ThemeChanger.sh | 16 |
1 files 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 \ |
