I found no way of calling KWin functions other than piping javascript into dbus and parsing the reply via journalctl, which... lol?
https://unix.stackexchange.com/questions/706477/is-there-a-w...
https://unix.stackexchange.com/questions/706477/is-there-a-w...