Draw the e-ink face from picture packs, with a built-in kestrel pack #191
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "eink-face-packs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this PR does
Lets both e-ink plugins draw the face from a picture pack instead of the text emoticons, through a new terminal-only
face_packoption, and ships an original pack,kestrel, drawn in code.eink_facelibrary 1.1 → 1.2 (additive).FacePack(name)resolves the option once:kestrelis the built-in pack: the bird's face (round eyes, the dark stripe under each, a small hooked beak), one picture for every key ofFACES, drawn bydraw_pack_facefromKESTREL_PACKand fitted to each panel.<face>.pngunder/etc/kestrel/faces/(PACK_DIR), which only an admin can fill; the name is held to[a-z0-9][a-z0-9_-]{0,31}, so it can't point anywhere else.O_NOFOLLOW, must be regular, at most 512 KB and 2048 px a side, and PNG; transparent counts as white; each is fitted to the face area and made 1-bit. A face the pack lacks falls back to the nearest classic face for Kestrel's own five moods (PACK_FALLBACK), then to the text face.eink-ws270.3.0 andeink-ws2130.2.0. Aface_packoption (str, default empty,root_only), the picture pasted centred in the old face area (130 x 46 and 88 x 35), and a Face pack card row when the option is set (the pack in use, or why none is).GUIDE_MD, both e-ink setup guides (a Face packs section with the mood names, sizes, limits and the install commands),plugin-libraries.md, andCLAUDE.md.eink-face-pack(since = "1.0.14"), the panel frame with the kestrel pack.guide.tomlfigures gaineink_options(plugin options for that frame only), whichfixture.eink_image()applies and restores.Checklist
tests/test_eink_face_packs.py(24 new tests) and the e-ink, library, declaration and core-lean tests pass. In the full suite, 1,739 pass; the 5test_web.pypotfile-import tests fail locally exactly as onmain(local werkzeug), so CI is the check for those.Release impact
plugins/*.pyand thekestrel_pipackage (userguide.py) change on the device; the docs andtools/ghost-guide/aren't shipped./etc/kestrel/faces/isn't created by the build; operators make it withsudo install -d(documented).Notes for review
face_packisroot_only, so the Plugins page shows it read-only, and the folder is root-owned, so the dashboard can never pick or plant a pack an admin didn't install. A dashboard picker or a zip upload would be a follow-up.🤖 Generated with Claude Code