KWin echo hack

Uses `print` instead of `console.log` and a bit of code copy/paste.