pluiedev / krunner-rs

A crate for writing KRunner plugins in Rust, easily.
5 stars 0 forks source link

Feature to define the configuration page in KDE Plasma Search settings #3

Closed bpavuk closed 2 months ago

bpavuk commented 2 months ago

image Some plugins can be configured by user, and they have a settings icon near their name, but as far as I know, krunner-rs does not allow developers to implement the settings window

pluiedev commented 2 months ago

That is indeed currently a missing feature — will take a jab at it when I have time

pluiedev commented 2 months ago

So I actually looked into how it's done, and unfortunately I don't think there is a way to do it with krunner-rs. krunner-rs relies on the D-Bus interface Plasma exposes for runners not written with C++/Qt, as interfacing with Qt code from Rust is... not very fun in general. Unfortunately, directly using Qt is required for configuration modules as they are loaded as plugins, that must inherit from the KCModule class. There's also no real way to write a D-Bus abstraction for this interface as it has to use Qt widgets directly.

Maybe it would work if you were to compile and install the configuration module separately, as the module actually needs to be manually specified by the X-KDE-ConfigModule key in the runner plugin's JSON file anyway (like this), but for now I don't really see how this could be implemented on my end.