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-null>
Status: CONFIRMED ---    
Severity: wishlist CC: 4wy78uwh, bnafta, daninshed, grantgryczan, jgqehj55, jgrdlgrd, kde, kdedev, nate, niccolo.venerandi, ped, severin.hamader, unkinkedmedal94
Priority: NOR    
Version First Reported In: 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
Comment 3 Grant Gryczan 2025-02-09 09:25:18 UTC
As a proponent of https://bugs.kde.org/show_bug.cgi?id=446654, I strongly disagree with this suggestion (though perhaps out of ignorance of its purpose?). I would expect the purpose of automatically cloning to be to keep them in sync between different monitors. If that's not possible, it would be superfluous and potentially misleading to only initially clone automatically but not automatically clone upon further changes to the original panel. Users may expect they will remain in sync.

You could solve this by somehow adding extra clarification to this option, but I don't understand the benefit of it being automatic if the cloned configuration won't also automatically remain in sync. If users have to create the initial clone manually, then it's much more natural an understanding that it won't remain in sync in the future, and they'll have to clone manually again to keep it in sync.

Keeping them in sync will require cloning manually down the line either way, so forcing users to do it manually to begin with makes it clear what they'll have to do, and how to do it, in the future.

It's generally very rare you plug in a new monitor, so in the vast majority of cases I would expect it to be easier & more intuitive to simply clone it once or twice than to find and check a box that does so automatically (and understand its drawbacks). What's the value add? I must be misinterpreting the point if it isn't to try to maintain the same panel on multiple monitors.
Comment 4 Roke Julian Lockhart Beedell 2025-02-09 10:10:56 UTC
(In reply to Grant Gryczan from comment #3)  
> It's generally very rare you plug in a new monitor, so in the vast majority of cases I would expect it to be easier & more intuitive to simply clone it once or twice than to find and check a box that does so automatically (and understand its drawbacks).

I frequently connect new monitors, because I own portable ones that I connect to my laptop, smartphone and desktop as I use them. For me, what you seem unusual is the vast majority of my experience.
Comment 5 Grant Gryczan 2025-02-09 11:06:35 UTC
I see. But in that case, wouldn't it still be the same monitor with an existing panel? Or does KDE forget the panel when you disconnect the monitor? I've disconnected and reconnected monitors before, and panels have never gotten lost.
Comment 6 Roke Julian Lockhart Beedell 2025-02-09 11:31:46 UTC
(In reply to Grant Gryczan from comment #5)  
I just happen to change my panel configuration fairly frequently too, so a way to synchronise it would mean a lot less manual work.
Comment 7 Maxim 2025-02-09 13:28:49 UTC
(In reply to Grant Gryczan from comment #5)
> I see. But in that case, wouldn't it still be the same monitor with an
> existing panel? Or does KDE forget the panel when you disconnect the
> monitor? I've disconnected and reconnected monitors before, and panels have
> never gotten lost.

Yeah, that happens a lot at work and home. Perhaps it's a bug in KDE, or maybe the monitor indeed identifies itself differently sometimes and there's nothing that KDE can do about it.
However, even beyond that - at work, many times you have to travel and connect to random monitors/projectors. Many offices nowadays have hot desks and you have to connect to random new monitor every day. There're lots of cases where new monitors is a norm.

This feature request has been created not to completely replace the option of always keeping a clone of a panel (I'd be happy if that request was implemented too). However, the original request to keep a clone of a panel raised many technical questions that were hard to address (like what to do in case the monitors have significantly different resolution and the mirrored panel is too big on the other monitor). So I raised this option as an alternative - temporary or permanent (KDE has always been about flexibility and configurability, so in theory both options could be kept).

Regarding the point of keeping the panels in sync and having to apply the changes manually to each of them in my original suggestion - yes, I agree that it can be a bit cumbersome and non-obvious at first. The advantages I see in this approach though are (especially if both mirroring and one-off cloning are implemented in future):

- Many times on the permanent setups, one may actually want the panels to drift a bit in their configuration. I'm for one who keeps them slightly different sometimes (say, clock/calendar and tray on the primary monitor only)
- The configuration of the existing panels is not frequently changed, so rarely adjusting it might not be a big deal. The biggest problem is the initial configuration that is addressed in my proposal
- In case major configuration changes are required, with my proposal it can be quickly addressed by deleting the cloned panel and reconnecting the monitor, for the panel to be cloned again

That being said, I'm not saying that the above points are applicable to everyone, and I do agree that people have different setups and use cases and some people may need to change the panel configuration daily (for whatever reasons - we're all different).

I'm just saying that if such an approach can be implemented in a reasonable time, it would already be a huge relief comparing to the lack of any cloning options atm. That doesn't cancel the fact the actual mirroring of a panel would be really nice to have and I don't see this proposal to be a replacement of mirroring. Rather a quick workaround or (better) an available alternative to mirroring.
Comment 8 Grant Gryczan 2025-02-10 04:28:41 UTC
(In reply to Roke Julian Lockhart Beedell from comment #6)
> I just happen to change my panel configuration fairly frequently too, so a
> way to synchronise it would mean a lot less manual work.

The fact that you seem to think this feature will help with that is exactly my point! This doesn't synchronize panels after changing them; rather, that's what https://bugs.kde.org/show_bug.cgi?id=446654 is for. This feature will easily mislead people to think it helps with synchronizing panels automatically, when all it does is clone them initially when you connect a new monitor. It will not keep them in sync.

(In reply to Maxim from comment #7)
> I'm just saying that if such an approach can be implemented in a reasonable
> time, it would already be a huge relief comparing to the lack of any cloning
> options atm. That doesn't cancel the fact the actual mirroring of a panel
> would be really nice to have and I don't see this proposal to be a
> replacement of mirroring. Rather a quick workaround or (better) an available
> alternative to mirroring.

I can definitely see your perspective here, and that's fair enough--again, as long as it's made very clear this feature won't automatically sync/mirror panels.
Comment 9 Roke Julian Lockhart Beedell 2025-02-10 11:10:15 UTC
(In reply to Grant Gryczan from comment #8)  
> This doesn't synchronize panels after changing them; rather, that's what https://bugs.kde.org/show_bug.cgi?id=446654

Yeah, I'd conflated them. Apologies. However, that's closed as INTENTIONAL, and just deleting a panel and duplicating a new one upon connection isn't so bad.
Comment 10 Peter Ped Helcmanovsky 2025-06-04 14:37:24 UTC
(In reply to Grant Gryczan from comment #3)
> Users may expect they will remain in sync.

Very likely, valid point.

> once or twice than to find and check a box that does so automatically (and
> understand its drawbacks). What's the value add?

I personally find it slightly easier to delete unwanted panel than initiating clone (as long as it's somewhat configurable and can be also disabled).

About keeping it in sync. I haven't think about it beyond initial idea, so maybe it's completely stupid, but how about making these clones temporary only, ie. they would be silently removed after disconnecting the screen and new clone created when connecting it again (and I guess upon manually editing any of the cloned panels on new screen all of them would become permanent, but that should be communicated somehow to user while editing the panel ... but the deletion of the panel is then ambiguous, does user want it to never again clone on that particular screen or they are deleting it to get fresh clone upon re-plug of screen, etc...). Maybe this was discussed already and refuted, but mentioning it here just in case nobody even thought about it.