KWin Scripting from 5.x to 6.x -- Compatible?

Afaik there is not any metadata needed, and needing no extra metadata is the point of doing the separation by category in the store. You upload the version that will work for v5 to the v5 category, and the version that will work for v6 to the v6 category.

Categories is fine, but what if the KWin script can actually be compatible with both, as suggested by @jinliu earlier? Will the metadata have to say that the script is only for 5 or 6 somehow?

The suggestion by jinliu just helps you generate the two different versions of the code from one common template, the resulting scripts will still be v5 or v6 only.

I’m not aware of any technical reason that there would actually need to be two separate (and different) KWin scripts for 5/6, rather than just two separate uploads of the same identical script.

Because of many breaking changes to the scripting API, such as the renaming of “client” to “window” in many commands which would affect just about any script.

In short, I think it is not worth trying to engineer some automatic compatibility magic, you’ll need two different versions of the script for 5 and 6 anyway, so I’d say just treat them that way, as two separate versions.

1 Like