A clean, minimal starting point for a KDE Plasma 6 Plasmoid — pure QML, no boilerplate:
| Feature | Details |
|---|---|
| Compact + Full representation | Panel icon expands to full popup |
| Config dialog | configGeneral.qml with KCM.SimpleKCM + main.xml for persistent settings |
| i18n | translate/ with .po files for de, es, fr (English is the source language, needs no .po) — ki18n_install wired up, Messages.sh extracts strings |
| Qt Quick Test | tests/tst_plasmoid.qml — run with ctest |
| Clean CMake | Only what's needed: ECM, KF6 Config/I18n/KCMUtils, Qt6 Quick/Test/QuickTest |
- Qt ≥ 6.7
- KDE Frameworks ≥ 6.10
- CMake ≥ 3.16
- Extra CMake Modules (ECM)
On openSUSE Tumbleweed:
sudo zypper install cmake kf6-extra-cmake-modules kf6-ki18n-devel kf6-kconfig-devel \
kf6-kcmutils-devel qt6-quick-devel qt6-test-devel qt6-quicktest-develOn Arch / KDE neon / Ubuntu with KDE PPA — install the equivalent *-dev packages.
Not on Tumbleweed and just want to build/test without installing all of the above? The CI container has everything preinstalled:
docker run --rm -it -v "$PWD":/src -w /src ghcr.io/agundur-kde/plasmoid-ci:latest bashOnly useful for the CMake/ctest/qmllint build-and-test path — for pure QML
iteration you don't need this or the packages above, see "Quick iteration" below.
git clone https://github.com/Agundur-KDE/KDE-Plasma-Plasmoid-template.git
cd KDE-Plasma-Plasmoid-template
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$HOME/.local"
make -j$(nproc)
make install(No sudo needed — installing to your own ~/.local is enough for Plasma
to find the plasmoid. For pure QML iteration you don't need to build/install
at all, see "Quick iteration" below.)
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
make tst_plasmoid
ctest --output-on-failureTests live in tests/tst_plasmoid.qml. Add TestCase { } blocks there as your plasmoid grows.
After cloning, run the interactive rename script once:
bash rename.shIt replaces all occurrences of de.agundur.myplasmoid / myplasmoid / KDE-Template,
renames the .po translation files, and updates metadata.json (name, description, author, URLs).
After adding or changing an i18n()/i18nc() call in the QML, run:
./Messages.shThis extracts every translatable string into translate/template.pot and merges it
into each existing translate/<lang>/*.po (adds new strings, keeps existing
translations and each file's header). Translators then fill in the empty msgstr
entries in the .po files.
plasmoidviewer can load a package straight from its source folder — no
kpackagetool6 --install / sudo make install round-trip needed while
you're just iterating on QML:
plasmoidviewer -a package/Edits to QML/config files apply on the next restart of plasmoidviewer.
Only install for real (kpackagetool6 --install package/, or make install for the compiled plugin) once you need a real desktop/panel
placement or system icon-theme resolution.
- Rename — find/replace
de.agundur.myplasmoidandmyplasmoidinCMakeLists.txtandpackage/metadata.json - UI — edit
fullRepresentation/compactRepresentationinpackage/contents/ui/main.qmlfor the popup content. Keep them inline there rather than splitting into separate files — QML ids (likeroot) aren't visible across files, so a separate file can't reach back intomain.qml's state. - Settings — add entries to
package/contents/config/main.xmland a matching field inconfigGeneral.qml - C++ plugin — optional, disabled by default. Uncomment
add_subdirectory(plugin)inpackage/CMakeLists.txtif you need a C++-backed QML type;package/plugin/FileReader.*is a working example to start from. It's intentionally simple: it opens whatever path itspathproperty is set to. Fine for a config-driven path you control — don't wire it up to untrusted/user-supplied input without adding your own validation.
Fork and adapt freely. If you improve something others would benefit from, a pull request is welcome.