add widget overlay system with some sample widgets - #733
Open
nunomdc wants to merge 7 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new widget overlay layer that renders lightweight RGBA overlays on top of plugin-generated images, along with a Web UI for enabling/reordering/configuring widgets and a CLI installer for managing widget installs.
Changes:
- Adds a widget framework (
BaseWidget, widget registry, widget composition utilities) and integrates widget rendering into refresh flows. - Adds Web UI pages for widget management and per-widget settings, plus a navigation entry + icon.
- Adds built-in sample widgets (date, IP address, static message), developer docs, and an
inkypi widgetCLI.
Reviewed changes
Copilot reviewed 24 out of 27 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_widgets.py | Adds API + utility tests for widget endpoints and contrast-color behavior. |
| src/widgets/widget_registry.py | Introduces widget loading/registry patterned after plugin registry. |
| src/widgets/static_message/widget-info.json | Declares metadata for the static message widget. |
| src/widgets/static_message/static_message.py | Implements the static message widget image generation. |
| src/widgets/static_message/settings.html | Adds per-widget settings UI for the static message widget. |
| src/widgets/ip_address/widget-info.json | Declares metadata for the IP address widget. |
| src/widgets/ip_address/ip_address.py | Implements the IP address widget image generation. |
| src/widgets/date_widget/widget-info.json | Declares metadata for the date widget. |
| src/widgets/date_widget/settings.html | Adds per-widget settings UI for the date widget. |
| src/widgets/date_widget/date_widget.py | Implements the date widget image generation. |
| src/widgets/base_widget/settings.html | Base widget settings template (currently empty). |
| src/widgets/base_widget/base_widget.py | Adds BaseWidget abstraction for widget implementations. |
| src/widgets/init.py | Establishes widgets package initialization. |
| src/utils/widget_utils.py | Implements widget overlay layout, contrast sampling, and composition. |
| src/utils/image_utils.py | Adds calculate_contrast_color() helper for widgets. |
| src/templates/widgets.html | Adds Widgets management page (enable/disable/reorder + global settings). |
| src/templates/widget_settings.html | Adds per-widget settings page shell and contrast toggle UI. |
| src/templates/inky.html | Adds Widgets navigation button to main UI. |
| src/static/icons/widgets.svg | Adds Widgets icon. |
| src/refresh_task.py | Applies widgets during refresh and when using cached images. |
| src/inkypi.py | Loads widgets and registers widget blueprint + template directory. |
| src/config.py | Adds widget discovery (read_widgets_list) and accessors. |
| src/blueprints/widget.py | Adds widget management + settings API and pages. |
| src/blueprints/plugin.py | Applies widgets to “update now” plugin image generation. |
| install/inkypi | Adds inkypi widget command routing. |
| install/cli/inkypi-widget | Adds widget installer/uninstaller/list CLI. |
| docs/building_widgets.md | Adds documentation for building and integrating widgets. |
Comments suppressed due to low confidence (1)
src/templates/widget_settings.html:52
widget_settings.htmlreferenceswidget.name, but widget metadata usesdisplay_name; this will leave the settings page header blank/undefined.
<h1 class="app-title">{{ widget.name }}</h1>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Nuno Duarte <nunomdc@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Introduces a new widget concept to InkyPi: lightweight overlays rendered on top of plugin-generated images. Widgets can be positioned, reordered, and configured independently from plugins through the web UI.
What's new
Widget system
src/widgets/directory: new widget layer withBaseWidget, a registry (widget_registry.py), and utilities (widget_utils.py)widgets.html,widget_settings.html) added to the Web UIBuilt-in sample widgets
CLI installer
inkypi-widgetscript: mirrorsinkypi-plugininkypi widget <subcommand>route added to the maininkypientry scriptScreenshots
Widget overlays
Widget UI