Make video wallpapers survive first contact
Shipping met reality tonight, and reality won three rounds before we did. mpvpaper's -f forks it into the background, which a supervisor reads as instant death — the respawn loop repainted the desktop black once a second. The reaper's own kills fired onExited like crashes, so the supervisor ate its young until deliberate deaths got marked. And the video's path shared wallpaperPath with the still pipeline, whose transactional persistence clobbered it — it now lives under its own videoWallpaperPath key, read by the lock screen and the doctor too. Restore is the service's own now, reactive and once per session: a one-shot timer raced the async preference load and availability probe at cold start and silently lost. A video-wallpaper IPC target drives start/stop/pause from a terminal and from the contract sweep to come. Verified live: one player per output, same PID across restarts, VAAPI engaged, 0.2% CPU steady for 1440p30 h264, pause from the bar pill. Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
@@ -98,8 +98,20 @@ PY
|
||||
for option in 'hwdec=vaapi' 'no-audio' 'loop-file=inf' 'input-ipc-server='; do
|
||||
rg -Fq "$option" "$service" || fail "the mpvpaper invocation is missing $option"
|
||||
done
|
||||
rg -Fq '"mpvpaper", "-f", "-o",' "$service" \
|
||||
rg -Fq '"mpvpaper", "-o",' "$service" \
|
||||
|| fail 'the mpvpaper invocation is no longer a fixed argv'
|
||||
# -f is banned outright: it forks mpvpaper into the background, which reads to
|
||||
# the supervisor as an instant death — the respawn loop it caused flashed the
|
||||
# desktop black once a second until the flag was removed.
|
||||
if rg -Fq '"mpvpaper", "-f"' "$service"; then
|
||||
fail 'mpvpaper is launched with -f again; the supervisor needs it foreground'
|
||||
fi
|
||||
# Restore is the service's own, reactive and once per session — a one-shot
|
||||
# timer raced the async preference load and the availability probe at cold
|
||||
# start and silently lost.
|
||||
for needle in 'function tryRestore' 'restoreConsumed' 'videoWallpaperPath'; do
|
||||
rg -Fq "$needle" "$service" || fail "startup restore lost its $needle"
|
||||
done
|
||||
rg -Fq 'command -v mpvpaper' "$service" \
|
||||
|| fail 'the shell never checks whether mpvpaper is installed'
|
||||
rg -Fq 'mpvpaper' "$packages" \
|
||||
|
||||
Reference in New Issue
Block a user