aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-31 09:32:18 +0100
committerDanilo M. <danix@danix.xyz>2026-10-31 09:32:18 +0100
commit1cfaaf13faa84f9ac9a55eb9b1eec863923596d0 (patch)
treeccf543b0858d2eb22b2da36c71ec1c5204294671
parentea405da5bcb491dcb8f0b3b35f19841cfe9dce8a (diff)
downloadwallp-1cfaaf13faa84f9ac9a55eb9b1eec863923596d0.tar.gz
wallp-1cfaaf13faa84f9ac9a55eb9b1eec863923596d0.zip
fix: light accent run on --restoreHEADmaster
A restore puts back what the last session showed, which with keystone's wallpaper engine on is usually a timer tick. Ticks run udt-accent light (UDT_ROTATION), leaving GRUB, the homepage and SDDM on the engine's home wallpaper. The login restore ran it full on the tick's image instead, so every boot rebuilt the GRUB and homepage themes and posted their root steps to the desktop. Before the engine, the restored wallpaper had always had its full run already, so the light run loses nothing there either. A set still runs it full. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rw-r--r--tests/wallp.bats16
-rwxr-xr-xwallp6
2 files changed, 21 insertions, 1 deletions
diff --git a/tests/wallp.bats b/tests/wallp.bats
index 8a092d4..fff5c84 100644
--- a/tests/wallp.bats
+++ b/tests/wallp.bats
@@ -181,6 +181,22 @@ EOS
grep -q "swaybg -o DP-3 -i $HOME/saved_v.png" "$HOME/calls.log"
}
+@test "restore runs udt-accent light, a set runs it full" {
+ cat > "$STUB_DIR/udt-accent" <<'EOS'
+#!/bin/bash
+echo "rotation=${UDT_ROTATION:-}" >> "$HOME/accent.log"
+EOS
+ chmod +x "$STUB_DIR/udt-accent"
+ CONF_OUTPUT_H="DP-1"; CONF_OUTPUT_V="DP-3"
+ : > "$HOME/dh.png"; : > "$HOME/dv.png"
+ CONF_DEFAULT_H="$HOME/dh.png"; CONF_DEFAULT_V="$HOME/dv.png"
+ do_restore
+ [ "$(cat "$HOME/accent.log")" = "rotation=1" ]
+ : > "$HOME/accent.log"
+ finalize
+ [ "$(cat "$HOME/accent.log")" = "rotation=" ]
+}
+
@test "restore falls back to conf defaults" {
CONF_OUTPUT_H="DP-1"; CONF_OUTPUT_V="DP-3"
: > "$HOME/dh.png"; : > "$HOME/dv.png"
diff --git a/wallp b/wallp
index 694d2b2..f2e8214 100755
--- a/wallp
+++ b/wallp
@@ -195,7 +195,11 @@ do_restore() {
file="$(restore_path_for "$logical")"
apply_output "$logical" "$file" || true
done
- finalize
+ # A restore puts back what the last session showed, which may be a
+ # wallpaper engine tick: GRUB, the homepage and SDDM were deliberately left
+ # on the engine's home, so the light run keeps them there. A full run here
+ # rebuilt both and posted their root steps on every login.
+ UDT_ROTATION=1 finalize
}
finalize() {