40 lines
1.3 KiB
Markdown
40 lines
1.3 KiB
Markdown
|
|
# Example Bar Widget Template
|
||
|
|
|
||
|
|
Minimal, modern starter for a simple DankBar widget that shows text and has one setting.
|
||
|
|
|
||
|
|
## How to Use This Template
|
||
|
|
|
||
|
|
1. Copy the entire `widget-bar/` folder to:
|
||
|
|
`~/.config/DankMaterialShell/plugins/YourPluginName/`
|
||
|
|
|
||
|
|
2. Edit `plugin.json`:
|
||
|
|
- Change `id` (must be unique, camelCase)
|
||
|
|
- Update `name`, `description`, `author`
|
||
|
|
- Adjust `icon` if desired
|
||
|
|
|
||
|
|
3. Rename and customize `Widget.qml` and `Settings.qml`.
|
||
|
|
|
||
|
|
4. Enable the plugin:
|
||
|
|
- Open DMS Settings → Plugins
|
||
|
|
- Click "Scan for Plugins"
|
||
|
|
- Toggle it on
|
||
|
|
- Add it to your DankBar layout (Appearance → DankBar)
|
||
|
|
|
||
|
|
5. Reload during development:
|
||
|
|
`dms ipc call plugins reload yourPluginId`
|
||
|
|
|
||
|
|
## What This Demonstrates
|
||
|
|
|
||
|
|
- Correct `plugin.json` with `settings_write` permission
|
||
|
|
- Use of `PluginComponent` with both horizontal and vertical pills
|
||
|
|
- Reactive access to settings via `pluginData`
|
||
|
|
- Modern settings UI using `PluginSettings` + `StringSetting`
|
||
|
|
- Proper use of `Theme` and `DankIcon`
|
||
|
|
|
||
|
|
## Next Steps
|
||
|
|
|
||
|
|
- Add a `popoutContent` for a panel when the user clicks the pill.
|
||
|
|
- Add `layerNamespacePlugin` if you add a popout.
|
||
|
|
- Explore the other templates in this skill for launcher, desktop, and Control Center patterns.
|
||
|
|
|
||
|
|
This template is intentionally tiny. Read the official plugin development guide for the full surface.
|