Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Created splash screen generator #206
This package creates a splash screen based on info in the deviceinfo file in it's postinstall hook.
This provides the make-splash.py script:
The image above is created with:
$ make-splash.py --text="On-screen keyboard is not implemented yet, Plug in a USB cable and run on your PC: telnet 172.16.42.1" 800 480 test.ppm
I recommend this:
I'm thinking a bit about having Python 3 in the base system though - we have it anyway in most cases, because for
The Alpine devs would try to keep the base system as small as possible, and I'm also a fan of that.
Anyway, the only satisfying alternative I can think of (which does not need Python 3) would be writing a tiny C program, that generates the splash screen on the fly and displays it (with fbdev or dri!). Then we could also put fancy animations in there ;)
But that is a lot more effort to get right than writing a short and maintainable Python program, so in conclusion I think this is a good solution for now! (Besides, we want to have a on-screen-keyboard for initramfs in the long term #59, so maybe it makes more sense to throw a splash screen into that code later.)
\o/ Thank you for making this!
The zipping from the gz can be easily done with gzip after generating the splash. If we add this as dependency for postmarketos-makeinitfs then it can call make-splash.py directly and pass it the correct paths to save it in the initramfs (and call gzip after).
The --text command does support newlines for the USB command.
centering the text would be kinda difficult since this is already manually doing word-wrapping for the line breaks.
I like both the last and the middle version. So what you are saying @MartijnBraam is, we would get rid of the post-install hook and directly generate the splash from the
Hmm maybe I can make the font paths configurable (since this is linux) so end users can change the splash config.
[background] color="#000000" [name] text=postmarketOS font="/usr/share/fonts/TTF/Roboto-Light.ttf" color="#ffffff" [logo] text="♻" font="/usr/share/fonts/ttf-dejavu/DejaVuSans.ttf" color="#009900" [text] font="/usr/share/fonts/TTF/Roboto-Light.ttf" color="#999999"
Since we're not creating ios but something customizable. This change is also quite easy to implement with configparser in python3
The config sounds good! So here are the TODOs, as I see it:
...and in another PR:
Looks like the last
HEAD of this branch had some changes lost, that you made (e.g. the
if __name__ == '__main__': block). This is also lost in the squashed version now. Please make a backup before pulling.
(If you don't have a backup, I can put up your branch before this "squash and rebase" step in another branch or so.)
This is how I "squashed and rebased" it now without having conflicts (as the tree was already a bit messy). Not how you should do it I guess, but it worked:
git checkout feature/dynamic-splash cp aports/postmarketos-splash /tmp git reset --hard HEAD~100 cp /tmp/postmarketos-splash aports git add -A git commit git push --force