Is it possible to use the callDBus method from JavaScript KWin scripts in a QML KWin script? There is no online documentation on using this, and I cannot find any projects that attempt to do so.
Found the solution, there is a class imported with org.kde.kwin called DBusCall that works fine. I also observed that the class was not documented anywhere except for in the header file of the C++ source code that created the QML class. Very fun
Hello. Could you please share a snippet of QML that demonstrates the use of DBusCall? I have taken a look at your API documentation page but couldn’t figure out how to get the call working.
I haven’t tried this but from the documentation it would look roughly like this
DBusCall {
id: activateLauncherCall
service: "org.kde.plasmashell"
path: "/PlasmaShell"
dbusInterface: "org.kde.PlasmaShell"
method: "activateLauncherMenu"
onFinished: (returnValue) => {
console.log("Call finished");
}
onFailed: {
console.log("Call failed");
}
}
Then somewhere else, in a JavaScript context, e.g. signal handler
activateLauncherCall.call();
Thanks a lot! I tinkered around with this last night got it to work for my karousel touchpad gesture effect.
I am surprised that it works without the dbusInterface
but I am glad I could help