diff options
| author | Don Williams <don.e.williams@gmail.com> | 2026-01-07 14:51:31 -0500 |
|---|---|---|
| committer | Don Williams <don.e.williams@gmail.com> | 2026-01-07 14:51:31 -0500 |
| commit | 95861d3827ce294ef321b996813c910bcf22b816 (patch) | |
| tree | dbd35f564ea171d1ceb7f78e2427e0f7d1d7e402 /config/hypr/scripts | |
| parent | 6c22b060a60ef539b856da859375a8279f31c1f2 (diff) | |
Adding better control over wallust pallete generation
Then refresh
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: config/hypr/scripts/ThemeChanger.sh
Diffstat (limited to 'config/hypr/scripts')
| -rwxr-xr-x | config/hypr/scripts/ThemeChanger.sh | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/config/hypr/scripts/ThemeChanger.sh b/config/hypr/scripts/ThemeChanger.sh index a40a1f18..604791c9 100755 --- a/config/hypr/scripts/ThemeChanger.sh +++ b/config/hypr/scripts/ThemeChanger.sh @@ -33,21 +33,21 @@ if (( prompt_status != 0 )) || [[ -z "${choice}" ]]; then exit 0 fi +# Record time before applying so we can wait for fresh template outputs +start_ts=$(date +%s) + # Apply the theme and report result if wallust theme -- "${choice}"; then have_notify && notify-send -a ThemeChanger \ -h string:x-dunst-stack-tag:themechanger \ "Global theme changed" "Selected: ${choice}" - # Regenerate templates from the current wallpaper to ensure Wallust rewrites waybar/rofi files - start_ts=$(date +%s) - wp_cur="$HOME/.config/hypr/wallpaper_effects/.wallpaper_current" - if [ -f "$wp_cur" ]; then - wallust run -s "$wp_cur" >/dev/null 2>&1 || true - fi - # Wait until template targets exist and are non-empty/newer than the start time - targets=("$HOME/.config/waybar/wallust/colors-waybar.css" "$HOME/.config/rofi/wallust/colors-rofi.rasi") + targets=( + "$HOME/.config/waybar/wallust/colors-waybar.css" + "$HOME/.config/rofi/wallust/colors-rofi.rasi" + "$HOME/.config/kitty/kitty-themes/01-Wallust.conf" + ) for i in $(seq 1 40); do ok=1 for f in "${targets[@]}"; do @@ -69,6 +69,11 @@ if wallust theme -- "${choice}"; then pkill -SIGUSR2 waybar >/dev/null 2>&1 || true fi fi + + # Ask kitty to reload its config so the new 01-Wallust.conf is picked up + if pidof kitty >/dev/null; then + for pid in $(pidof kitty); do kill -SIGUSR1 "$pid" 2>/dev/null || true; done + fi else have_notify && notify-send -u critical -a ThemeChanger \ -h string:x-dunst-stack-tag:themechanger \ |
