A possible future for output assignment in Plasma
Open, Needs TriagePublic

Description

layout templates

Instead of saving the layout of panels and widgets on the primary, secondary etc monitors we only use layout templates, which are presets for how a layout should be set up (similar to what ships with global themes right now).
When a display is connected to the computer Plasma then loads the preferred layout for that display, adjusts it to the resolution and displays it to the user. The template is however never changed in that process; changes from that automatic adaption are not saved.

When a user explicitly changes the layout of the screen Plasma should then ask them whether or not they want to save the changes to the template itself or if they only want to save it on that monitor (which would then simply create a new template for that monitor).
This should of course be skipped if the layout is only used on one monitor and probably have a "always apply to this template" button or something like that.

A new KCM would be introduced where a user can choose their default layout and also set layouts for all their currently connected monitors as well as for all those monitors they connected to the past (although I'm not sure if the latter makes the KCM more complex than it needs to be).

the upsides

  • increased flexibility: instead of having a layout for the primary screen, the concept of the primary screen can (but does not have to) be ignored; instead, every individual monitor you connect can have its very own layout. You can also apply the templates on a screen configuration basis;
  • multiple monitors can have the same layout and that automatically synchronized
  • newly added monitors would have a panel on them by default (or whatever the user desires)
  • we can easily add layouts that help users coming from different OSs feel more at home, without needing to create lots of global themes for it
  • the bug of Plasma "losing" the layout for a monitor should be solved (like bugs 429266, 396071, 362058, 427861)
  • the bug of things shifting around on mode change or monitor change should be solved, or at the very least made less bad (https://bugs.kde.org/show_bug.cgi?id=360478)
  • the issue of the "primary monitor" more or less missing on Wayland would also be gone

the downsides

  • for some monitor-layouts, increased complexity facing the user (although it does also reduce complexity for others)
  • increased complexity in code and probably a very big amount of needed changes

I don't think I'll have any time working on something like this in the near future but I just wanted to throw this idea out here. Tell me what you think :)