wasp-os/tools
kozova1 2624a6e998 Added basic theming engine.
This theming engine uses a bytestring (but supports anything indexable,
as long as the index results are a byte long),
stored as `wasp.system._theme`.
It has a default value, which should not change anything about the way this looks currently.

The theme can be set via `wasp.system.set_theme`,
but this should *ONLY* be used in `main.py`.
`wasp.system.set_theme` will return True if it was successful,
or False if the theme is of an old format.
Using an old format theme will *not* crash the watch,
but will use the default theme instead.

To theme this, one has to use tools/themer.py (use flag -h for complete explanation)
to generate a bytestring that's added in main.py (see diff).

The bytestring is then loaded into 'wasp.system._theme'.
Theme values can be looked up by apps by using `wasp.system.theme("theme-key")`.
Theme keys appear in the function body of `wasp.system.theme()`.

I've took the liberty of converting existing apps to use this method,
and it seems to work well.

A test theme is provided in `tools/test_theme.py`

Signed-off-by: kozova1 <mug66kk@gmail.com>
2020-12-13 16:51:07 +00:00
..
intelhex@c9beea9f10 tools: Update intelhex, hexmerge.py and nrfutil for python 3.9 compatibility 2020-12-12 09:11:12 +00:00
micropython-font-to-py@5975b35883
nrfutil@8c2f9e3439 tools: Update intelhex, hexmerge.py and nrfutil for python 3.9 compatibility 2020-12-12 09:11:12 +00:00
ota-dfu@3d6fd30d33
pynus@5572b01b26
hex2c.py hex2c.py: Adopt a maximum chunk size 2020-11-04 19:06:03 +00:00
hexmerge.py tools: hexmerge: Replace redundant copy with a symlink 2020-12-10 19:44:40 +00:00
preprocess.py tools: preprocess: Ensure we use python3 interpreter 2020-08-02 11:54:58 +01:00
rle_encode.py tools: rle_encode: Add support for rendering 2-bit RLEs to C src 2020-11-08 14:29:10 +00:00
test_theme.py Added basic theming engine. 2020-12-13 16:51:07 +00:00
themer.py Added basic theming engine. 2020-12-13 16:51:07 +00:00
wasptool tools: wasptool: Improve error reporting if we can't sync 2020-10-21 20:49:48 +01:00