Skip to content
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

Apply the "new" NixOS branding to the custom apps #364

merged 78 commits into from Jul 19, 2021


Copy link

@samueldr samueldr commented Jun 17, 2021

A fresh coat of paint.

Look at it


Or I guess this screenshot... if you like:


In addition to it looking objectively more on-brand™, there are some neat backing changes.

The main one, I guess, is the way building those GUI apps has been reviewed with mkLVGUIApp. A common and unique interface, allows accessing an app's "simulator" much more easily.

Another thing I guess is important: a unified and reviewed way to access assets. While beforehand only the logo was present, now we have fonts (TTF!) and more graphical miscellaneous niceties. The way it's been reviewed allowed all hacky methods to access those to be removed.

Oh... Right! TTF fonts! This is great as it allows us to just request any font at any size! Additionally, the way the engine was tweaked, it falls back to a fallback.ttf font, which in theory could include any unicode glyphs... But for now it's only FontAwesome. Using FontAwesome as a fallback gives us the same semantics as the internal font engine provides.

And well, I reorganized the LVGUI code a bit for a new upcoming app.


  • Review highly probable size increase in stage-1
  • optimize svg (svgo?) for assets derivation
  • Ensure virtual keyboard for passphrase input is okay

Size increase?

Ugh, this will push us over the 16MiB partition sizes on some motorola devices again. I guess I'll need to look at a way to cut some things for those platforms? It is possible to remove the added freetype font engine. And all added resources were implemented with nice fallbacks. This way it would look objectively worse, but still work just fine.

Looking at motorola-potter:

-r--r--r-- 1 root root 15777792 Dec 31  1969 result
-r--r--r-- 1 root root 16537600 Dec 31  1969 result

759808 bytes increase in the compressed artifact. Yikes. Though we're still 239616 bytes under the 16MiB limit.

We could provide an internal option to remove the fonts from the output:

-r--r--r-- 1 root root 16228352 Dec 31  1969 result

This gives us back 309248 bytes. At the cost of making the interface less correctly responsive on a limited subset of devices (currently only motorola-potter and motorola-addison). Adding the freetype support (in addition to the other changes) seems to increase the compressed boot image size by 450560 bytes.

See #387

@samueldr samueldr added the 4. type: enhancement New feature or request label Jun 28, 2021
Copy link
Member Author

@telent do you have the spare time to check whether this actually still fits with motorola-potter?

It would probably benefit from an actually bespoke totally
white-on-black theme.
`| tail` with a large systemd log can be slow.
It seems to be worth it:

Done in 157 ms!
50.681 KiB - 93.7% = 3.181 KiB

Done in 93 ms!
11.604 KiB - 46.5% = 6.205 KiB
Copy link
Member Author

The last few force pushes fix landscape metrics.

Rather than always use the width, we're now using the smaller dimension, which makes the applets more usable in landscape orientation.

Relatedly, in landscape mode we apply some fixes to make the applets behave more like expected. While some may find only using a centered column to be wasteful, in reality here this helps make the user interface more consistent across sizes.

Anyway, landscape use is the outlier.

@samueldr samueldr merged commit 5d85ba7 into NixOS:master Jul 19, 2021
@samueldr samueldr deleted the feature/lvgui-theme-nixos branch July 19, 2021 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4. type: enhancement New feature or request
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant