Skip to content

Commit dc15a69

Browse files
committed
fix(desktop-widget-settings): Added a section in the Desktop Widgets, and fixed some examples in the manifest
1 parent 4a71792 commit dc15a69

2 files changed

Lines changed: 28 additions & 3 deletions

File tree

src/content/docs/development/plugins/desktop-widget.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,24 @@ readonly property string message:
161161
"Default Message"
162162
```
163163

164+
165+
## Desktop Widget Settings
166+
167+
You can provide a dedicated settings UI for your desktop widget that allows users to configure per-instance options (like show/hide background, layout mode, colors) directly from the widget's settings menu.
168+
169+
Register a `desktopWidgetSettings` entrypoint in your `manifest.json`:
170+
171+
```json
172+
{
173+
"entryPoints": {
174+
"desktopWidget": "DesktopWidget.qml",
175+
"desktopWidgetSettings": "DesktopWidgetSettings.qml"
176+
}
177+
}
178+
```
179+
180+
For a complete guide, see [Desktop Widget Settings](/development/plugins/desktop-widget-settings/).
181+
164182
## Using widgetData
165183

166184
Widget-specific configuration is available through `widgetData`. This is useful for per-instance settings:

src/content/docs/development/plugins/manifest.mdx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Every Noctalia plugin must include a `manifest.json` file that describes the plu
2323
"main": "Main.qml",
2424
"barWidget": "BarWidget.qml",
2525
"desktopWidget": "DesktopWidget.qml",
26-
"desktopWidgetSettings": "DesktopWidgetSettings.qml"
26+
"desktopWidgetSettings": "DesktopWidgetSettings.qml",
2727
"controlCenterWidget": "ControlCenterWidget.qml",
2828
"launcherProvider": "LauncherProvider.qml",
2929
"panel": "Panel.qml",
@@ -199,9 +199,10 @@ See [Desktop Widget Guide](/development/plugins/desktop-widget/) for details.
199199

200200
### `desktopWidgetSettings`
201201
- **File**: DesktopWidgetSettings.qml
202-
- **Purpose**: Desktop widget specific data
202+
- **Purpose**: Per-instance settings UI for desktop widgets
203203
- **Use cases**:
204-
- Change widget data of a specific desktop widget
204+
- Configure individual widgets
205+
- Per-instance options that differ from plugin-wide settings
205206

206207
**Example**:
207208
```json
@@ -212,6 +213,10 @@ See [Desktop Widget Guide](/development/plugins/desktop-widget/) for details.
212213
}
213214
```
214215

216+
:::tip
217+
If `desktopWidgetSettings` is not defined, the system falls back to the `settings` entrypoint (if available) when the user opens the widget settings from the context menu.
218+
:::
219+
215220
See [Desktop Widget Guide](/development/plugins/desktop-widget-settings/) for details.
216221

217222
### `controlCenterWidget`
@@ -470,6 +475,7 @@ The PluginRegistry validates manifests with these rules:
470475
"main": "Main.qml",
471476
"barWidget": "BarWidget.qml",
472477
"desktopWidget": "DesktopWidget.qml",
478+
"desktopWidgetSettings": "DesktopWidgetSettings.qml",
473479
"controlCenterWidget": "ControlCenterWidget.qml",
474480
"panel": "Panel.qml",
475481
"settings": "Settings.qml"
@@ -491,6 +497,7 @@ The PluginRegistry validates manifests with these rules:
491497
- [Getting Started](/development/plugins/getting-started/) - Create your first plugin
492498
- [Bar Widget Guide](/development/plugins/bar-widget/) - Develop bar widgets
493499
- [Desktop Widget Guide](/development/plugins/desktop-widget/) - Create desktop widgets
500+
- [Desktop Widget Settings Guide](/development/plugins/desktop-widget-settings/) - Create desktop widgets settings
494501
- [Control Center Widget Guide](/development/plugins/control-center-widget/) - Add control center buttons
495502
- [Launcher Provider Guide](/development/plugins/launcher-provider/) - Extend the launcher
496503
- [Panel Guide](/development/plugins/panel/) - Create overlay panels

0 commit comments

Comments
 (0)