I’m trying to make a script for moving the current window to # desktop with Super + Shift + # and following the active desktop with it. I’m working off this similar script that is using an older API so it’s incompatible with Plasma 6. I’ve tried modifying it to work with the newer API, with which I’m unfamiliar since this is my first Kwin script, and I can’t figure out how to change the active window to a different desktop.
I am working under the assumption that workspace.activeWindow is the API that gives me the client as the original creator calls it. This is what’s stumping me. I tried to set the client.currentDesktop to change the client’s location but that didn’t work so I went into the “Window” specific APIs and the only one I could find is the desktops property which sounds like a read-only property by name and description so I’m having trouble figuring out how to set it.
I set both using the call client.currentDesktop = targetDesktop or client.desktops = targetDesktop.
Is there a different way to handle this function?