diff --git a/src/data/servicetypes/plasma-runner.desktop b/src/data/servicetypes/plasma-runner.desktop --- a/src/data/servicetypes/plasma-runner.desktop +++ b/src/data/servicetypes/plasma-runner.desktop @@ -68,3 +68,8 @@ [PropertyDef::X-Plasma-DBusRunner-Path] Type=QString + +# Request actions only when the plugin is initialized instead +# of each match session, default is false +[PropertyDef::X-Plasma-Request-Actions-Once] +Type=bool diff --git a/src/dbusrunner.cpp b/src/dbusrunner.cpp --- a/src/dbusrunner.cpp +++ b/src/dbusrunner.cpp @@ -84,8 +84,11 @@ //don't check when not wildcarded, as it could be used with DBus-activation m_matchingServices << requestedServiceName; } - - connect(this, &AbstractRunner::prepare, this, &DBusRunner::requestActions); + if (service->property(QStringLiteral("X-Plasma-Request-Actions-Once")).toBool()) { + requestActions(); + } else { + connect(this, &AbstractRunner::prepare, this, &DBusRunner::requestActions); + } } DBusRunner::~DBusRunner() = default;