See also Plasma Packages
This document describes the Plasmoid Package Format. It uses the Plasma::Package implementation in libplasma as a basis.
A Plasmoid is packed in one zip compressed file that contains all the necessary files to run the plasmoid. It is best to give it a .plasmoid extension. It can also pick icons from the icon theme running in KDE as well as SVGs from the Plasma Theme.
The files in a Plasmoid package can be code, images, layout or plasmoid-specific data files.
To keep those files separated each filetype is stored in a subdirectory.
In the root of the package, an XML format file called metadata.xml which gives a detailed description of the plasmoid.
metadata.desktop contains the following mandatory fields:
Optionally these fields can be added:
An example file can be seen here:
When a Plasma package is installed via the Plasma Packager, it will store the package in $APPDATA/plasma/$PACKAGE_TYPE_ROOT then read metadata.xml and create a .desktop file which it will install into the services directory. In this way, Plasma can use KTrader to find all Plasmoids whether they are written in C++ or an interpreted language.
A user interface needs to be created for browsing through packages for installation as well as a class for browsing the contents of a package, getting information on it and pulling out files on demand.
Another nice thing to be done would be a small command-line app to quickly create plasmoids with arbitrary metadata information, just for testing purposes.