Bug 497100

Summary: Feature Request: Automatically clone selected panels when connecting a new display
Product: [Plasma] plasmashell Reporter: Maxim <maxim.kukushkin>
Component: PanelAssignee: Plasma Bugs List <plasma-bugs>
Status: CONFIRMED ---    
Severity: wishlist CC: 4wy78uwh, bnafta, jgqehj55, jgrdlgrd, kde, kdedev, nate, niccolo.venerandi, severin.hamader, unkinkedmedal94
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Maxim 2024-12-05 20:25:32 UTC
SUMMARY
When using two (or more) monitors, it is convenient to have a panel on each monitor such that all panels are completely identical. Currently, it's either tedious process of creating a new panel from scratch and replicating all widgets and their settings, or (with the upcoming or just implemented change) still a manual step of selecting a panel and cloning it.

It would be nice if cloning could be automated (see Additional Information for a more elaborated suggestion)

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Kernel 6.12.1-arch1-1
KDE Plasma Version:  6.2.4
KDE Frameworks Version:  5.116.0
Qt Version: 6.8.1

ADDITIONAL INFORMATION

This is a re-iteration of the previous feature request (https://bugs.kde.org/show_bug.cgi?id=493195) with a different suggested approach discussed in the comments there.

Basically, the main concern when implementing automatic cloning was the decision making of which panels to clone and how to differentiate a new monitor and a previous monitor (in case monitors change their IDs. Also, there was a concern about different resolutions and aspect ratios in theory making the cloned panel look ugly.

The suggestion in this feature request is: Always prefer user's choice and let the user decide. If the setup didn't work nicely - it was the user's elaborate choice anyway.

Regarding the proposed algorithm:

- Implement a panel attribute "Clone to new monitors" which is by default set to FALSE. This ensures backward compatibility with the current behavior and no unexpected side effects
  - If the user sets this flag intentionally - they assume responsibility of panels in theory not fitting well different resolutions
  - At this point a warning can be shown to indicate possible side effects

When a monitor is connected:
- Check if the connected monitor already has any panels
- If yes -> do nothing. This monitor has been connected before, the panels have already been cloned, or the user already customized it
- If no, check each panel to find those which have the above flag set
- If the clone flag is set -> Copy the panel to the connected monitor

This is a simple algorithm that:
- Ensures backward compatibility
- Doesn't affect existing setup and doesn't clone panels indefinitely
- Addresses automatic provisioning of a new monitor with panels
- Is flexible, cause it lets the user choose which panels to clone automatically (maybe someone prefers to clone only one panel to extra monitors, but have panels on the main one)

The panel configuration page can also have a question mark next to the "Clone to new monitors" flag, to show a quick summary of the above algorithm to give the user an idea of how it works.
Comment 1 medalzz 2024-12-08 05:04:04 UTC
Mentioning the issue https://invent.kde.org/plasma/plasma-workspace/-/issues/144 here since it seems to be the same/close enough.
Comment 2 TraceyC 2024-12-09 17:13:54 UTC
This seems like an interesting idea