Reply to topic

Using D-Bus in a KWin script (signals and QDBusVariant)

Registered Member
I need to use D-Bus, and I know we have the callDBus function to call methods, but I'm having these issues:
1. I can't find a way to listen to D-Bus signals from a KWin script
2. I'm trying to use org.kde.KWin /VirtualDesktopManager, but in order to use the virtual desktop methods I need to know the desktops' UUID
I can get org.kde.KWin.VirtualDesktopManager.desktops as a QDBusVariant, but I don't know how to parse it

I can probably implement it in a Python script and use org.kde.KWin /Scripting org.kde.kwin.Scripting.loadScript but I'd rather the code to be in a KWin script
How can I achieve either signals or parsing org.kde.KWin.VirtualDesktopManager.desktops from a KWin script?

Edit: I understood it now, desktops is a(iss) which means an array of structs, each containing the index (int), id (string) and name (string) of the desktop
I still don't get how to use it in a KWin script though


Reply to topic


Who is online

Registered users: Baidu [Spider], Bing [Bot], boudewijn, davide445, Google [Bot], hiteshshah, madkhoram, Mamarok, millaan, raphaelra