Kwin script folder structure is correct but script is not listed

Hi,

Even though in the metadata.json I have ““X-Plasma-MainScript”: “contents/code/main.js”,”

and use the right folder structure I get this error :

lockdesktops/

├─ metadata.json
└─ contents/
└─ code/
└─ main.js

kpackagetool6 --type=KWin/Script --list # ~/.local/share/kwin/scripts/
Listage des types de KPackage : KWin/Script dans /home/user/.local/share/kwin/scripts/
KPackageStructure of KPluginMetaData(pluginId:“lockdesktops”, fileName: “/home/user/.local/share/
kwin/scripts/lockdesktops/metadata.json”) does not match requested format “KWin/Script”

I’m on 6.2.5 on fedora 41. Would anyone know why this happens?

In a kwinscript of mine, I have “X-Plasma-MainScript”: “code/main.js” - maybe that’s the whole problem.

Your posted structure looks like contents, code and main.js are all in the same folder, which would be wrong, too. But I assume thats just the formatting.

1 Like