- QML 91.8%
- CMake 8.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| package | ||
| po/de | ||
| .gitignore | ||
| CMakeLists.txt | ||
| plan.md | ||
| README.md | ||
Web Frame
Web Frame is a Plasma 6 desktop widget. One instance shows one image. Each instance has its own source, interval, and download, so two frames on the desktop do not share a picture.
The source is either a camera from the WP Camera Snapshots plugin, or any http or https URL that returns an image (JPEG, PNG, WebP, SVG, and the other formats Qt can decode). The widget is a QML package. Someone who receives the .plasmoid needs Plasma 6 and that file.
WP Camera Snapshots
The site exports images through the WP Camera Snapshots plugin. That repository is the server side. This widget only reads the API.
Site https://www.lsv-linkenheim.de/, camera runway_05.
The widget requests that camera from the site’s REST API:
GET https://www.lsv-linkenheim.de/wp-json/wp-camera-snapshots/v1/cameras/runway_05
It does not open the webcams page. The image is in the JSON body. When the server marks the snapshot as a fallback, the frame still shows that image and adds the caption “Camera offline”.
Image URL
https://www.bohlhof.de/api/webcam/1
The address must start with http:// or https://.
Updating
The default interval is 2 minutes. The settings dialog stores it as hours, minutes, and seconds. The frame fetches when it appears, when you apply settings, and then on that interval.
If a later refresh cannot reach the host, the last image stays. Hover the frame for the time of the last successful update. While that refresh is failing, the tooltip also says “No connection. Showing the last image.” After the machine sleeps, a missed interval is fetched within a few seconds of waking.
A certificate the system rejects is a failed load. The widget cannot turn certificate checks off.
Background
The frame uses the desktop theme background. Enter desktop edit mode and press the widget. Its toolbar includes Hide Background, and Plasma remembers that choice for the instance. Showing the background again uses the same button.
About this widget
Plasma’s “About this widget” reads package/metadata.json. It shows the name Web Frame, version 1.0.0, the author Stefan Maier, the license GPL-2.0-or-later, and this description:
Shows one image from a WP Camera Snapshots camera or an image URL, and refreshes it on an interval.
The German description is in the same file. The version in CMakeLists.txt (project(webframe VERSION …)) and KPlugin.Version must be the same string. The build stops when they differ.
Runtime packages
SVG and WebP need the Qt image plugins that ship with Plasma: qt6-svg-plugins and qt6-image-formats-plugins.
The interface is English. German is the shipped translation.
Local testing
Building needs CMake, Ninja, Extra CMake Modules, and KF6 I18n. The viewer is plasmoidviewer from the Plasma SDK. Configure once from the repo root:
cmake -G Ninja -B build
Build, then open the unpackaged widget. plasmoidviewer reads QML from package/ and does not install the widget into the desktop session.
cmake --build build
plasmoidviewer -a "$PWD/package" -l floating -f planar
Change the source in the widget’s settings dialog and apply it. An empty configuration stays on “Choose a source”.
A QML edit in package/contents/ui/ is what the next viewer start loads. Run cmake --build build again when the German catalog changes, and whenever you want a fresh .plasmoid. The build compiles po/de/plasma_applet_org.lsv.plasma.webframe.po into package/contents/locale/ and then packs the zip. That locale directory is generated.
German in the viewer:
LANGUAGE=de plasmoidviewer -a "$PWD/package" -l floating -f planar
Messages about isScreenUiReady, cfg_*Default, ConfigCategoryDelegate, and BreadcrumbControl come from the viewer shell. They are not widget errors.
Building the .plasmoid
From the repo root, after the configure step above:
cmake --build build
The file is build/org.lsv.plasma.webframe-*.plasmoid. It is a zip with metadata.json at the archive root, plus contents/. Share that file as it is.
Installing a shared .plasmoid
Hand someone the org.lsv.plasma.webframe-*.plasmoid file. On their Plasma 6 desktop they open Add Widgets, choose Get New Widgets, then “Install Widget from Local File…”, and pick the file. Web Frame then appears in the widget list. This is a local install of that file. It is separate from publishing on the KDE Store.
The same install from a terminal, with the file in the current directory:
kpackagetool6 -t Plasma/Applet -i org.lsv.plasma.webframe-*.plasmoid
When that id is already installed, upgrade it:
kpackagetool6 -t Plasma/Applet -u org.lsv.plasma.webframe-*.plasmoid
Plasma keeps the copy it already loaded. After an upgrade, restart the shell so the desktop widget reads the new files:
systemctl --user restart plasma-plasmashell.service
Remove it:
kpackagetool6 -t Plasma/Applet -r org.lsv.plasma.webframe
Plasma stores the unpacked widget in ~/.local/share/plasma/plasmoids/org.lsv.plasma.webframe. The viewer command above still reads the repo’s package/ directory, so it can show newer QML than the copy installed on the desktop.
License
GPL-2.0-or-later.