diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-29 12:37:47 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-29 12:37:47 +0100 |
| commit | cc91156f9f564b2a3265ad530116a999ffe2122b (patch) | |
| tree | 68c97f00c36671b59ce6563ac91d55469a041ccd /desktop/modules/appearance/Wallpapers.qml | |
| parent | 4d1c5acf5748b9a9b9b40cfb6ee1118593bacecd (diff) | |
| download | quickshell-cc91156f9f564b2a3265ad530116a999ffe2122b.tar.gz quickshell-cc91156f9f564b2a3265ad530116a999ffe2122b.zip | |
wallpaper: burn the old picture away on Apply
swaybg has no transitions: wallp kills the running one and starts a new
one, which can show a frame of nothing in between. WallpaperSpread puts a
click-through surface on the bottom layer of each screen, above swaybg and
below every window, holding the old picture while wallp runs. A shader
burns it away over the new one: each pixel's threshold mixes its distance
from a random starting point with fractal noise, and a flame and char band
runs just ahead of the front. The surface goes once wallp has exited, or
at once if it failed, since a failed set may have left either picture.
Wallpapers.apply() announces each swap with the old path before wallp
runs, while current still names it. Sets from a terminal get no effect:
by the time wall_h changes, swaybg has already swapped.
The animation is linear, 3.5s: an ease spent its slow ends where nothing
was left to burn, and read as well under the 2.6s it was given. The
compiled .qsb is committed beside its source, since nothing builds it.
AGENTS.md gains the shader cache trap hit on the way: a running shell
keeps a shader by URL, so a recompiled .qsb under the same name is
ignored.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/appearance/Wallpapers.qml')
| -rw-r--r-- | desktop/modules/appearance/Wallpapers.qml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/desktop/modules/appearance/Wallpapers.qml b/desktop/modules/appearance/Wallpapers.qml index 7d671e1..9e9d4ad 100644 --- a/desktop/modules/appearance/Wallpapers.qml +++ b/desktop/modules/appearance/Wallpapers.qml @@ -57,6 +57,9 @@ Singleton { property bool scanning: true property bool applying: false signal applied(bool ok, string message) + // Sent before wallp runs, while current still names the old picture, so + // WallpaperSpread can cover the swap with it. + signal swapping(string which, string from, string to) // Sorted by most recent first: the wallpaper wanted now is usually one // added recently. -maxdepth keeps a stray git checkout from being walked. @@ -225,6 +228,8 @@ Singleton { function apply() { if (applying || !dirty) return; applying = true; + if (pendingH !== "" && currentH !== "") swapping("H", currentH, pendingH); + if (pendingV !== "" && currentV !== "") swapping("V", currentV, pendingV); const args = []; if (pendingH !== "") args.push(`H=${JSON.stringify(pendingH)}`); if (pendingV !== "") args.push(`V=${JSON.stringify(pendingV)}`); |
