aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Williams <don.e.williams@gmail.com>2026-01-08 22:05:17 -0500
committerDon Williams <don.e.williams@gmail.com>2026-01-08 22:05:17 -0500
commit7375b7c8471aec8b33b902d260aceb75385a25bd (patch)
tree0a80085572cd20cf01b6b9d11372db9ec21afce3
parentc65f9fe0412dafdadee17ee3dc7c42285dcc3753 (diff)
Tweaking wallust timing
On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: config/hypr/scripts/WallustSwww.sh
-rwxr-xr-xconfig/hypr/scripts/WallustSwww.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/config/hypr/scripts/WallustSwww.sh b/config/hypr/scripts/WallustSwww.sh
index 50c85630..63911036 100755
--- a/config/hypr/scripts/WallustSwww.sh
+++ b/config/hypr/scripts/WallustSwww.sh
@@ -80,10 +80,39 @@ cp -f "$wallpaper_path" "$wallpaper_current" || true
# Ensure Ghostty directory exists so Wallust can write target even if Ghostty isn't installed
mkdir -p "$HOME/.config/ghostty" || true
+wait_for_templates() {
+ local start_ts="$1"
+ shift
+ local files=("$@")
+ for _ in {1..50}; do
+ local ready=true
+ for file in "${files[@]}"; do
+ if [[ ! -s "$file" ]]; then
+ ready=false
+ break
+ fi
+ local mtime
+ mtime=$(stat -c %Y "$file" 2>/dev/null || echo 0)
+ if (( mtime < start_ts )); then
+ ready=false
+ break
+ fi
+ done
+ $ready && return 0
+ sleep 0.1
+ done
+ return 1
+}
# Run wallust (silent) to regenerate templates defined in ~/.config/wallust/wallust.toml
# -s is used in this repo to keep things quiet and avoid extra prompts
+start_ts=$(date +%s)
wallust run -s "$wallpaper_path" || true
+wallust_targets=(
+ "$HOME/.config/waybar/wallust/colors-waybar.css"
+ "$HOME/.config/rofi/wallust/colors-rofi.rasi"
+)
+wait_for_templates "$start_ts" "${wallust_targets[@]}" || true
# Normalize Ghostty palette syntax in case ':' was used by older files
if [ -f "$HOME/.config/ghostty/wallust.conf" ]; then
@@ -98,3 +127,10 @@ done
if pidof ghostty >/dev/null; then
for pid in $(pidof ghostty); do kill -SIGUSR2 "$pid" 2>/dev/null || true; done
fi
+
+# Prompt Waybar to reload colors
+if command -v waybar-msg >/dev/null 2>&1; then
+ waybar-msg cmd reload >/dev/null 2>&1 || true
+elif pidof waybar >/dev/null; then
+ killall -SIGUSR2 waybar 2>/dev/null || true
+fi
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage