daily-wallpaper: add bar widget, panel, and desktop widget for the caption - #410
Draft
jstehn wants to merge 1 commit into
Draft
daily-wallpaper: add bar widget, panel, and desktop widget for the caption#410jstehn wants to merge 1 commit into
jstehn wants to merge 1 commit into
Conversation
Contributor
|
CC @nzlov |
18 tasks
…ption Bing and NASA both ship a caption alongside their photo of the day, but the service only used it to build the wallpaper's cache filename, discarding the text itself. Captures it at the point each source resolves and publishes it as plugin state, then adds three views: a bar widget (glyph + optional short caption; click opens the panel), a panel with the full caption, credit, and a "learn more" link, and a matching desktop widget card. - Bing's `copyright` field is split into a title and a "(© ...)" credit. - NASA's gallery-item caption has no separate credit line; its own article link is used as "learn more" instead of the Bing quiz link. - Metadata is fetched even when the day's image is already cached (e.g. after a process restart), independent of the download step. - NASA extraction (image, caption, link) is bounded to a small substring around the first gallery item rather than scanning the whole page: the original whole-page regex intermittently exceeded Noctalia's per-callback CPU budget against the real nasa.gov page.
jstehn
force-pushed
the
add-bar-panel-desktop-widgets
branch
from
August 19, 2026 10:16
473e200 to
e7b0861
Compare
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.
Plugin
nzlov/daily-wallpaperplugin.toml)What it does
Bing and NASA both ship a caption alongside their photo of the day, but the
service only ever used it to build the wallpaper's cache filename — the text
itself was discarded. This adds three pure-view surfaces that show it: a bar
widget (glyph + optional short caption; click opens the panel), a panel with
the full caption, credit, and a "learn more" link, and a matching desktop
widget card. The background service is unchanged in what it fetches; it now
additionally captures and publishes the caption at the point each source
resolves.
copyrightfield (e.g. "Caption text (© Photographer/Source)") issplit into a title and a credit.
empty; its own article link is used as "learn more" instead of Bing's quiz
link.
after a process restart before this session ever resolved a source), so
the caption doesn't stay blank until the next day's fetch.
Also fixes a real bug found while testing the NASA path, unrelated to the
caption feature itself: the pre-existing primary-image regex scanned the
whole page with a lazy
.-span, and intermittently exceeded Noctalia'sper-callback CPU budget against the real nasa.gov page (confirmed live —
same line, unmodified from
main, before I touched it). All three NASAextractions (image, caption, link) are now bounded to a small substring
around the first gallery item instead.
External dependencies
Adds
xdg-open(fromxdg-utils) for the panel's "Learn more" button, openingthe caption's source link. Already declared in
dependenciesinplugin.toml.Testing
Tested live via a
pathplugin source pointing at this branch, on bothsource = "bing"(the default) andsource = "nasa":noctalia plugins lintand the repo's ownvalidate-plugins.pyboth pass; the existingwallpaper-download/apply behavior is unaffected for either source
(
Daily Wallpaper applied: ...logs and the wallpaper is actually set,confirmed by screenshot for both); the
todaystate publishes the correcttitle/credit for both sources on a fresh resolve and on a forced refresh
via
noctalia msg plugin nzlov/daily-wallpaper:service all refresh; thepanel opens/closes with no runtime errors for either source; the NASA
CPU-budget fix was confirmed by reproducing the original error live, then
confirming it's gone after the fix, across several repeated refreshes.
Screenshots / Videos
Not yet included — opening as Draft for that reason. I have real
screenshots from live testing (bar widget + desktop widget on Bing, panel
open on both Bing and NASA), but I'd rather have a person look at what's in
frame before anything from a live desktop goes into a public PR. Will add
before this comes out of Draft.
Checklist
idafter the/inplugin.tomlexactly.plugin.toml,README.md,thumbnail.webp, andtranslations/en.json.README.mdfollows the README template, documents every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.thumbnail.webpwith the thumbnail generator. (Unchanged from the existing plugin — happy to update if maintainers want the new surfaces reflected.)versionfollows semver and is bumped in this PR;plugin_apiis the oldest API level this plugin requires.catalog.toml; CI generates it.Code review attestation
licensedeclared inplugin.toml.