- 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
This commit is contained in:
1 parent
4fd2641c80
commit
7501fc3ad9
11 files changed
+212
-34
No files matched your search
+16
-2
@@ -1,5 +1,19 @@
|
||||
#!/bin/sh
|
||||
# Render the theme's PNGs from the SVGs beside this script (needs rsvg-convert).
|
||||
# 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 moon track fill; do rsvg-convert "$f.svg" -o "chandra/$f.png"; done
|
||||
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
|
||||
Reference in new issue
Block a user