Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This pull request adds basic support for loading a theme stored on persistent storage. On boot, InfiniTime will look for a file located at
/themes/theme.cfgand load the colors from the file. A new setting has been added to allow reloading the theme file without requiring a reboot.Theme file format
The theme file itself is a custom key-value style configuration file. The goal is to be easily editable, but simple to parse to avoid taking a dependency on a potentially large JSON/YAML parsing library. The following theme was used to create the attached screenshots:
Process for applying a theme
In order to apply a theme, the user needs to write or find a theme file and move it to the PineTime's persistent storage using a compainion app. Not all apps support moving arbitary files to persisent storage, but it is currently possible using ITD with a physical device, or on InfiniSim using the bundled
littlefs-dotool. One the theme has been sent to the device, the user needs to navigate to Settings>Theme>Reload Theme to apply it.Notes
Pictures