I’m wondering if anyone knows or can help provide some direction on trying to get a list of the current desktop ID’s under Wayland in a plasmoid and if there’s a specific import that I need to be doing.
For context, I have my own fork of the plasma pager which has a bunch of personal modifications but someone has raised an issue, which I realize is due to the way that the list of desktops that a window is on differs between X11 and Wayland.
Under X11, for a window object, window.desktops will return an integer, however under Wayland, that same window.desktops will return a UUID, so everything works fine when I’m comparing a looped list of desktop indexes which are integers against the window.desktops when it’s an integer, but this doesn’t work when it’s a UUID obviously.
I’m having trouble getting a list of these id’s via the existing pagerModel and I’m not managing to make sense of using an org.kde.taskmanager import as I seem to only be able to see VirtualDesktopInfo via console logging and can’t return the desktops list that I was hoping for.
Any help to point me in the right direction would be much appreciated.
Awesome, thank you for your help and this suggestion in particular. Just using TaskManager.VirtualDesktopInfo.desktopIds after doing the import didn’t seem to be working, but using the readonly property like the linked plasmoid does is working. Specifically, lifting the following straight out has helped already:
I still need to do more work, but this gets me heading in the right direction.
How should I consider going about this? Should I get on Matrix do discuss it with someone first? And of the configurable features, which do you think would be the ones most likely to be of interest upstream?
but makes it possible to configure the pager to only display the rectangles when hovering over the desktop
This seemed like a setting pagers’ users might like.
The pager tooltips have been modified to highlight the ‘Urgent’ window in the list of windows when there is a window that demands attention (this is not configurable).
That seemed nice as well.
You can give it try either opening MR directly and have a discussion then or go to plasma-devel matrix channel.