fix: a desktop Plasma makes after the layout has run gets the classroom's wallpaper
Tiny Pebbles came through the 0.2.2 upgrade on Plasma's own purple wallpaper: its desktop was containment 10, made after the layout had run (most likely the television arriving after a night-time reboot), with no wallpaper configured. The look and feel's fallback could not catch it, because it named a file and Plasma only accepts a wallpaper package there. The fallback is now the EkklesiaClassroom package, whose one image links to the classroom's picture. classroom-desktop-wallpaper, run before every plasmashell start, writes the picture into every desktop containment the file already has: found by plugin, never by number; panels and everything else byte for byte; a file that is already right not written at all. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
530f6f6563
commit
7b4ac39cd2
@@ -176,6 +176,32 @@ install -Dm644 \
|
||||
"$ROOT/config/wallpapers/classroom-calm.png" \
|
||||
"$STAGE/usr/share/backgrounds/ekklesia/classroom-calm.png"
|
||||
|
||||
# THE SAME PICTURE, AS A WALLPAPER PACKAGE.
|
||||
#
|
||||
# The look and feel names this as the default for any desktop Plasma makes
|
||||
# without the layout, and Plasma only accepts a package there, never a
|
||||
# file. Its one image is a link to the file above rather than a copy, so
|
||||
# there is still exactly one picture, and every desktop the layout wrote
|
||||
# keeps pointing at the path it always has. The name says the image's
|
||||
# size, because that is how Plasma chooses between a package's images.
|
||||
WALLPAPER_PACKAGE="$STAGE/usr/share/wallpapers/EkklesiaClassroom"
|
||||
|
||||
install -Dm644 \
|
||||
"$ROOT/config/wallpapers/EkklesiaClassroom/metadata.json" \
|
||||
"$WALLPAPER_PACKAGE/metadata.json"
|
||||
|
||||
wallpaper_size="$(python3 -c '
|
||||
import struct, sys
|
||||
with open(sys.argv[1], "rb") as png:
|
||||
header = png.read(24)
|
||||
assert header[:8] == b"\x89PNG\r\n\x1a\n" and header[12:16] == b"IHDR"
|
||||
print("%dx%d" % struct.unpack(">II", header[16:24]))
|
||||
' "$ROOT/config/wallpapers/classroom-calm.png")"
|
||||
|
||||
install -d -m755 "$WALLPAPER_PACKAGE/contents" "$WALLPAPER_PACKAGE/contents/images"
|
||||
ln -s /usr/share/backgrounds/ekklesia/classroom-calm.png \
|
||||
"$WALLPAPER_PACKAGE/contents/images/${wallpaper_size}.png"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -466,6 +492,10 @@ install -Dm755 \
|
||||
"$ROOT/scripts/classroom-desktop-reset" \
|
||||
"$STAGE/usr/local/bin/classroom-desktop-reset"
|
||||
|
||||
install -Dm755 \
|
||||
"$ROOT/scripts/classroom-desktop-wallpaper" \
|
||||
"$STAGE/usr/local/bin/classroom-desktop-wallpaper"
|
||||
|
||||
install -Dm755 \
|
||||
"$ROOT/scripts/classroom-theme" \
|
||||
"$STAGE/usr/local/bin/classroom-theme"
|
||||
|
||||
Reference in New Issue
Block a user