Files
chandra/boot/plymouth/render.sh
T
nandi 7501fc3ad9
CI / test (push) Failing after 50s
Boot splash: cycle the moon through its phases
- Replace the static moon with a 64-frame lunar phase spritesheet, generated by boot/plymouth/render-phases.py and advanced about every 0.3 s (~5 s per cycle)
- Add a glow sprite behind the moon whose opacity follows the illuminated fraction
- render.sh renders the glow SVG and the phase sheet (needs python3 with numpy and Pillow)
- install-plymouth.py removes theme files that are no longer in the source theme, and checks for the new PNGs
- Drop moon.svg and moon.png in favour of glow.svg, glow.png and moon-phases.png
2026-11-29 02:39:26 -08:00

20 lines
573 B
Bash
Executable File

#!/bin/sh
# Render the theme's PNGs from the SVGs and lunar-phase generator beside this script
# (needs rsvg-convert and python3 with numpy + Pillow).
set -e
cd "$(dirname "$0")"
for f in glow track fill; do rsvg-convert "$f.svg" -o "chandra/$f.png"; done
py=""
for candidate in python3 /usr/bin/python3; do
if command -v "$candidate" >/dev/null 2>&1 && "$candidate" -c "import numpy, PIL" 2>/dev/null; then
py="$candidate"
break
fi
done
if [ -z "$py" ]; then
echo "render.sh: python3 with numpy and PIL is required" >&2
exit 1
fi
"$py" ./render-phases.py