-
-
Notifications
You must be signed in to change notification settings - Fork 1
Plugin Creation Tool
Tools → Plugin Creation…
Plugin Creation turns a one-off Custom Node into a portable, schema-validated plugin that users can install and reuse.
It does not invent a second node system. It formalizes the same model Studio already uses:
Custom Node (escape hatch)
↓
Author/refine in dialog
↓
Validate against plugin schema
↓
Generate manifest + plugin JSON
↓
Export · or · Install locally
↓
Community pack/local pack
Custom nodes stay the incomplete-by-design escape hatch for quick experiments. Plugin Creation is the formalization layer on top of them.
| Situation | Use |
|---|---|
| One-time experiment, throwaway code |
Custom Node (visual.custom_lua, source.custom_script, etc.) |
| Reusable node you want to keep across projects | Plugin Creation → Install locally |
| Share with the community/Node Vault | Plugin Creation → Export JSON |
| Something Studio already ships | Built-in node (no plugin needed) |
- Open Conky Studio.
- Go to Tools → Plugin Creation….
- (Optional) Select a Custom Lua or Custom Script node on the canvas first; the dialog will pre-fill the code body and pick the matching category.
The dialog has five tabs. Work left-to-right.
| Tab | What you set |
|---|---|
| 1 · Identity | Category, type id, label, author, version, description, output kind, poll defaults |
| 2 · Properties | The knobs users will see in the Property Panel |
| 3 · Code body | The Lua/script/conf that implements the node |
| 4 · Media | Tags, homepage, license, icon (for store listing) |
| 5 · Validate/Export | Schema check, JSON preview, export or local install |
Bottom buttons:
- Validate — run schema + id checks (does not write files)
- Export JSON… — save a single-plugin file or mini-manifest
-
Install locally — register into
~/.config/conky-studio/plugins/and refresh the palette
Choose one:
| Category | Typical use | Required body field |
|---|---|---|
logic |
Expressions, math, bindings | lua_expr |
visual |
Drawn widgets (rings, bars, text, effects) | lua_draw_body |
source |
Shell/data producers | script_body |
canvas_ext |
Conky config directives (own_window, gaps, etc.) | conf_directives |
Changing category updates the Code body tab and suggests a starter type id.
Must match:
^(logic|visual|source|canvas_ext)(\.[a-z][a-z0-9_]*)+$
Examples:
visual.plugin.soft_ringsource.plugin.weather_locallogic.plugin.clamp01canvas_ext.plugin.rounded_corners
Rules:
- Lowercase letters, digits, underscores only
- Starts with the category
- At least one dotted segment after the category
- Label — what appears in the palette and property panel title
- Author — your name or handle
-
Version — semver recommended (
1.0.0) - Description — short help text for the store/plugins dialog
-
Logic nodes need an
output_kind(number,percent,text,boolean, etc.). -
Source nodes need
poll_mode(interval/once/ …) and usuallypoll_interval.
Properties become the fields users edit in the Property Panel.
- Click Add (or Add common… for category presets).
- Fill:
| Field | Notes |
|---|---|
| Key |
snake_case, starts with a letter (radius, line_width) |
| Label | Human-readable name shown in the UI |
| Kind |
float, int, bool, string, color, enum, etc. |
| Default | Starting value |
| Bindable | Allow wiring from other nodes (logic/visual only) |
| Accepts | Optional list of bind kinds (percent,number) |
| Group | Property Panel group header (e.g., Geometry, Colors) |
| Help | Tooltip / help text |
Add common… inserts typical properties for the current category (radius, color, thickness, etc.) so you don’t start from a blank list.
You can edit or remove rows later. Keys must stay unique and match the regex above.
This is the implementation. The exact field depends on category.
Lua that draws inside the node’s local coordinate space. Studio already provides helpers (cairo, colors, gradients, scale, etc.).
Use placeholders for properties:
-- {radius}, {line_width}, {color} are replaced from property values
cairo_set_line_width(cr, {line_width})
-- color helpers usually take the raw property valueOptional lua_helpers box: extra functions that will be emitted into the generated Lua framework.
A single expression (or short chunk) that produces the output value. Placeholders work the same way.
Shell (or other) script whose stdout becomes the source value. Poll settings from the Identity tab control how often it runs.
One or more Conky config lines. Only keys in the allowed canvas_ext set are accepted (same list the loader uses).
Anywhere in the body you can write {property_key}. At codegen time Studio substitutes the property’s current value (or a safe default). Keep keys identical to the ones you defined on the Properties tab.
Used mainly for community/Node Vault listings:
- Tags — comma-separated search keywords
- Homepage — project or docs URL
-
License — e.g.,
MIT,GPLv3(It must be either of these options) - Icon — path or identifier (store-dependent)
- Screenshot/gif/video fields when you publish to a store pack
You can leave this tab empty for private local plugins.
Click Validate. The log shows:
- Schema errors from
plugins/schema.py+loader.validate_only - Type-id regex failures
- Missing required body fields
- Unknown property kinds
- Placeholder keys that don’t match any property
Fix issues on the earlier tabs, then validate again until the log is clean.
The JSON preview shows the exact object that will be written (same shape as entries in a community plugins.json).
Saves either:
- A single plugin object, or
- A mini-manifest (
{ "api_version": "1.1", "plugins": [ … ] })
Choose a location (Downloads, a repo folder, etc.). Share that file, or drop it into a pack that the Plugins dialog / loader can read.
Registers the plugin into:
~/.config/conky-studio/plugins/
and refreshes the Studio palette so the new type appears immediately under the correct category. No restart required in normal cases.
After install you can:
- Drag the new node from the palette onto the canvas.
- Edit its properties like any built-in node.
- Build/preview as usual.
- Select the Custom Lua or Custom Script node on the canvas.
- Tools → Plugin Creation… (body + category are pre-filled).
- Set a proper type id and label.
- Add the properties you were hard-coding.
- Replace hard-coded numbers in the body with
{key}placeholders. - Validate → Install locally.
- Delete or keep the original Custom Node as a draft.
- Tools → Plugin Creation…
- Pick category → fill Identity.
- Add common… then trim/edit properties.
- Write the code body (or paste from a working Custom Node).
- Validate → Install or Export.
- It appears in the palette under its category.
- Drop it on the canvas like any other node.
- Wire inputs if properties are bindable.
- Property Panel shows the fields you defined.
- Build/Export project as usual — codegen treats plugin nodes the same as built-ins.
To remove a local plugin later, use Tools → Plugins… (or delete the entry from the local plugins pack and restart/refresh).
- Export a clean mini-manifest or single-plugin JSON.
- Include author, version, description, and tags.
- Publish via the Node Vault/community plugins process, or open a PR against the community pack.
- Others install with Tools → Plugins….
Only share plugins you trust; Studio loads them with the same privileges as other user code.
| Do | Don’t |
|---|---|
| Keep type ids unique and descriptive | Reuse an existing built-in or plugin id |
| Validate before every export | Ship JSON that fails schema checks |
Use {key} placeholders that match property keys |
Leave magic numbers that users can’t edit |
| Prefer Install locally while iterating | Manually edit the plugins pack by hand unless you know the format |
| Start from a working Custom Node | Try to invent a new node model outside the four categories |
Type id rejected
→ Must start with logic., visual., source., or canvas_ext. and use only [a-z0-9_].
Missing body
→ Each category requires its specific field (lua_draw_body, script_body, …).
Property key invalid
→ Lowercase, starts with a letter, only letters/digits/underscores.
Placeholder not substituted
→ Key in {…} must exactly match a property key.
Palette doesn’t update after install
→ Dialog already tries to refresh; if needed, switch tabs or reopen the project.
Studio
├── Built-in nodes
└── Custom nodes ──author──► Plugin Creation
│
├─ Schema validation
├─ Manifest / JSON
└─ Export or local install
│
▼
Common node model → Codegen
Custom nodes remain the escape hatch. Plugins are the portable, validated form of the same idea. You never have to choose between “quick experiment” and “proper distribution”; you start with the first and promote to the second when it’s ready.
- Tools → Plugins… — browse, install, and manage plugin packs
- Custom nodes:
visual.custom_lua,source.custom_script, and related types in the palette - Project wiki home and Node Vault store for community packs