Quick start
Create a folder inside Waydir's plugins directory. The fastest way to open that folder is Preferences -> Plugins -> Open plugins folder.
| OS | Plugin folder |
|---|---|
| Linux | ~/.config/waydir/plugins/ |
| macOS | App support directory, then plugins/ |
| Windows | App support directory, then plugins/ |
1. Create the folder
text
selection-count/
manifest.json
init.lua2. Add manifest.json
json
{
"id": "selection-count",
"name": "Selection Count",
"version": "1.0.0",
"author": "you",
"description": "Shows how many items are selected.",
"api_version": 2,
"permissions": []
}This plugin only shows a toast, so it needs no permissions.
3. Add init.lua
lua
waydir.register({
id = "count",
menu = "context",
title = "Show selection count",
when = { min = 1 },
run = function(ctx)
waydir.toast("Selected: " .. ctx.count .. " (" .. ctx.dir .. ")")
end,
})4. Reload and test
Open Preferences -> Plugins and click Reload plugins. Then select one or more files or folders, right-click, and choose Show selection count.
If the plugin does not appear, check that:
- the folder contains both
manifest.jsonandinit.lua; api_versionis2;- the selected files match the
whenfilter; - the plugin is not disabled in Preferences.