Kwin scripting: Running terminal commands

Is there any way to run external commands within a Kwin script?

I used to do it using Plasma5.DataSource, but since it is in the process of being deprecated on Plasma 6 I was wondering if there was a better alternative.

Thanks for the help.