# How to create a plasmoid

The KDE wiki has a [Getting Started and Hello World](https://techbase.kde.org/Development/Tutorials/Plasma5) tutorial which you can read as well.

### Default Widgets

#### Learn By Example

You can learn by example by reading the default widgets located at:\
`/usr/share/plasma/plasmoids/`

You can fork an existing widget by copying the widget to where the downloaded widgets are installed to:\
`~/.local/share/plasma/plasmoids/`

To properly fork the widget, rename the new folder, then edit the `Id` in the `metadata.json` file to match the new folder name. You will also want to edit the `Name` in the `metadata.json` file as well so you can tell it apart from the widget you forked it from. You should delete all the translated `Name[fr]` lines as well. Delete the `metadata.desktop` if it exists.

Finally, run `plasmawindowed` to quickly test the newly forked widget.

```bash
cd /usr/share/plasma/plasmoids/
mkdir -p ~/.local/share/plasma/plasmoids
cp -r /usr/share/plasma/plasmoids/org.kde.plasma.analogclock/ ~/.local/share/plasma/plasmoids/
cd ~/.local/share/plasma/plasmoids/
mv ./org.kde.plasma.analogclock ./com.github.zren.myanalogclock
cd ./com.github.zren.myanalogclock
sed -i 's/Analog Clock/My Analog Clock/' ./metadata.json
sed -i 's/org.kde.plasma.analogclock/com.github.zren.myanalogclock/' ./metadata.json
sed -i '/^Name\[/ d' ./metadata.json
sed -i '/^Comment\[/ d' ./metadata.json
rm ./metadata.desktop
plasmawindowed com.github.zren.myanalogclock
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.novaflowos.com/start/kde-developer-platform/readme/plasma/widget/_index.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
