Keyboard shortcut to move active window to next activity

Hi all,

I’m trying to move the active window to the next activity.

I’m open to any way to do this while using a keyboard shortcut.

Currently, I am trying a bash script that uses kdotool getactivewindow for the active window ID, then qdbus org.kde.ActivityManager /ActivityManager/Activities CurrentActivity for the current activity, then qdbus org.kde.ActivityManager /ActivityManager/Activities ListActivities for all the activities. Buuut I can’t seem to find a way to put this together.

Anybody have any pointers? I only have two activities, so this may be a bit easier than other configurations.

Thanks for any input you may have,
Sergio

I am using Wayland, by the way…