I’m trying to use org.kde.plasma.workspace.dbus with a plasmoid and can’t figure out how to get it to work. Since there doesn’t seem to be a section on it in api.kde.org, I looked through the source and found this: components/dbus/dbusconnection.h · master · Plasma / Plasma Workspace · GitLab . When using the snippet
import org.kde.plasma.workspace.dbus
...
const pendingReply = SessionBus.asyncCall({
"service": "org.kde.plasmashell",
"path": "/PlasmaShell",
"iface": "org.kde.PlasmaShell",
"member": "wallpaper",
"signature": "(u)",
"arguments": [
new DBus.uint32(0)
],
})
pendingReply.finished.connect(() => {
console.log("Current wallpaper is", pendingReply.value["wallpaperPlugin"])
pendingReply.destroy()
})
...
The code throws ReferenceError: DBus is not defined. Is there any additional imports required with this? I tried looking through lxr but couldn’t find anywhere this is used.