plasma.loadSerializedLayout(layout) not restoring panels on proper display (wayland)
As a developer creating a global theme, it is currently not possible to place a panel on a specific display in a multi-monitor setup. Wayland has deprecated the concept of "primary displays", so desktops in var desktopsArray = desktopsForActivity(currentActivity());
cannot be discerned.
When you have a multi-monitor setup (3 screens) and create new theme with the "Plasma Global Theme Explorer", and then click "Layout from current Plasma Setup" and "defaults from current setup" buttons, it creates a file in contents/layouts/org.kde.plasma.desktop-layout.js
which has var layout = {...}
, a JSON object that contains all the panels.
However, when this script is run, all panels get placed on the central display instead of one panel on each display.
This issue concerns the default script that is provided by the "plasma global theme explorer". After reading the plasma docs and deep diving into this issue, it seems there is no way to programatically place panels on a certain desktop - so this seems like a bug to me.