Bug 485340

Summary: Widgets should be able to resolve bundled icons and notifyrc files
Product: [Plasma] plasmashell Reporter: Diyou <diyou.dev>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: kde, nate, notmart
Priority: NOR    
Version First Reported In: 6.0.3   
Target Milestone: 1.0   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Diyou 2024-04-10 19:28:04 UTC
I asked at https://discuss.kde.org/t/plasmoids-not-resolving-bundled-icons-or-notifyrc/13863

Basically I'd like plasma to resolve icons and notifyrc files from within the plasmoid folder given a folder structure like: 

MyPlasmoid/
├── contents/
│   ├── ui/
│   │   └── main.qml
│   ├── icons/
│   │   └── MyPlasmoid.svg
│   └── notifyrc/
│   │   └── MyPlasmoid.notifyrc
└── metadata.json

This way it would be possible to display a bundled & theme-able icon as the thumbnail in the "Add widgets..." side panel.

To make the notifyrc and icon files available as early as possible I found plasmoids set the "EnabledByDefault" property in the metadata.json and execute a shell script to copy those to fixed locations(e.g. ~/.local/share/knotifications6/ and ~/.local/share/icons/).
This doesn't handle any sort of automatic cleanup of course and is frankly to hacky & insecure for my taste.