-
-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DietPi-Banner | Add color to large hostname #6173
base: dev
Are you sure you want to change the base?
Conversation
Many thanks for your PR.
Yeah, to be honest, that was my first thought, especially with a pre-compiled binary where we cannot know for sure what is inside (unless we can reproduce the build exactly). But more importantly: this binary will only work with the exact platform you compiled it on, at least only on that exact architecture and a range of glibc versions. So we'd need a minimum of 4 (soon 5 => RISC-V) binaries, probably 12 (15) if we need/want dedicated ones for each supported Debian version (using latest glibc on each). A possible approach would be to add
This is btw another reason why it should be optional in any case: Simple boot consoles usually support only a very minimal 8 color set, so there it won't work well or look ugly, as long as the tool isn't smart to use a different color set depending on terminal capabilities. Can be tested of course. |
Can you point me at a way to do the optional software builds? That's what I intended to do first but couldn't grok it just by looking at the repo. I like the colors because they make it much clearer which host I'm logging into, so it's not just eye candy (really!). If I can make it a software option, then how should that work? When you install lolcat-cc it automatically colors the banner, or selecting colorful banner automatically installs the package? |
You can have a look into how we do for Gogs:
At least it should be possible to select it for install directly from the |
Just thinking out aloud here. Could probably code this in bash, although, could be a massive performance hit?
|
Here is the script we use for the large letters: https://github.com/MichaIng/DietPi/blob/master/dietpi/func/dietpi-print_large In theory every letter could made an associative array with External command calls are "expensive" as well, so probably it would be still faster. Just wondering how much if would affect the non-colour variant and how to nicely detect which colour codes are actually supported by a particular terminal or whether to simply always use the |
Lol, sorry, I had no idea this existed. Very nice! |
Simple addition of lolcat to make large prompts colorful. I had a dilemma here:
lolcat
is found in the ubuntu repo but relies on ruby and is very slowlolcat
, re-written in C and has a snap package available but is bigger (50k) thanlolcat-cc
lolcat-cc
is very quick and the smallest standalone binary (30k) but not found in any repoI went with the smallest, fastest package, which was
lolcat-cc
This is a frivolous upgrade, which just looks really nice in a modern terminal. I understand if there's no appetite for bloating DietPi by 30k for eye candy reasons.