Development/Tutorials/Plasma4/ContainmentAction

You can use Plasma ContainmentAction e.g. for Context Menus on your Plasma Desktop. They will run as plugins meaning you can add and remove them after compilation. If they exist, their name will be stored in .desktop files. ContainmentActions can only be written in C++ or QML, not in other Plasma programming languages, e.g. NOT in javascript.

Test it

Then click "Apply". You will see the config file ~/.kde4/share/config/plasma-desktop-appletsrc changes. Next time when you middle-click (or whatever you selected) onto your desktop, your own context menu will appear: