I downloaded and installed a configurable window button widget. I added it to a panel and an icon. The command I want it to perform is a Kwin shortcut: Move window to the next monitor.
I have this set up now with a hot key: Ctl+Alt+N.
But I want to be able to do this with my mouse. I think I am close I just need the actual command to insert in the widget.
To do the same as the shortcult you need to use a script which translates your mouse movement into a shortcut - or something like it.
The only member I know of with a knowledge on how to to make something like this happen is @Ben - at least for as long it is Plasma related hope you don’t mind @Ben .
This member has an extended experience doing something like it - translating mouse movements into actions - I think we should summon his expertise/experience as this member is using KDE / Plasma.
Alternatively wmctrl can move windows and also works in wayland, but I don’t think there’s a move to screen option, so you’d have to figure out where to put the window yourself.
As I suspected, the answer was qdbus related. Many thanks to
Luis Bocanegra via KDE Discuss for the super easy answer. You just had to know what it is and he did.
So, to get a list of all the kwin shortcuts use this command in a terminal.
…
qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.shortcutNames
…
In my case I want the: Window to Next Screen. So the whole command for this is below. Note the quotes.
…
qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut “Window to Next Screen”
…
Insert the kwin shortcut command of your choice into a configurable window button widget. Pick an icon.