A simple KWin script that introduces a KDE Global Shortcut for centering the active window in the current screen.
This fork kinda works in Plasma 5.20.5
cd into the repo and execute this command:
kpackagetool5 --type=KWin/Script -i .
I then started the "Shortcuts" editor in KDE, searched for "center" and added a shortcut. Then it worked.
I did a bit of experimentation with the code, and now I don't know how to deinstall the plugin anymore. So I'm not sure it will really work with the two-step processs described above.