Widgets move around after restart

This is my system: Operating System: Fedora Linux 41
KDE Plasma Version: 6.2.2
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.5-300.fc41.x86_64 (64-bit)
Graphics Platform: Wayland

When I “attach” 2 widgets so they have no space between them, it will work until after I restart. I can see their original positions for a split second but then they keep away from each other, as you can see in the picture. Sometimes, attempting to bring them closer makes them jump halfway across the screen.

On the right, you can see how it looks like before restarting, on the left you can see how it looks like after restarting, every time, no exceptions:

Plasma really doesn’t like widgets touching each other, and will try to fix this. If you think this should be something that you are allowed to do - you may want to try to open a bug report about this.

1 Like

Thank you. If as you said, they are going to fix it, then wouldn’t my bug report be redundant?

Sorry, I wrote something that was confusing. I meant that Plasma will automatically “fix” overlapping(*) widgets by moving them away from each other. As far as I know there is no effort to change that behaviour.

*) Plasma widgets have some amount of padding around the visible part that is still part of the widget, so if you arrange your widgets so that they are visibly touching - they are really overlapping a bit.

I see. However, this only happens in a single moment after restarting. Widgets do stay together before restarting. Isn’t it possible to save their coordinates somehow and make them “return” to that position? I mean, it is not a dealbreaker, but it is still nice to be able to place widgets to one’s liking.

You can do that… but it ain’t pretty.

Here’s how:

  1. Open the file ~/.config/plasma-org.kde.plasma.desktop-appletsrc with a text editor, I recommend Kate.
  2. Locate the widget that you want to edit - for example, I have an analog clock, I can find it by its fully qualified name by searching for org.kde.plasma.analogclock, and here it is:
[Containments][23][Applets][456]
immutability=1
plugin=org.kde.plasma.analogclock

We can see that it is applet “456” in containment “23”. If you have multiple instances of the same applet, or even on different screens/activities it can get hairy, but you’ll figure it out.

  1. Locate the section for [Containments][23] (just that header, without anything - it should be a bit above the applet section) and it’ll contain a bunch of ItemGeometries fields, once for each possible screen resolution, maybe like this:
[Containments][23]
ItemGeometries-1200x1920=Applet-40:0,0,368,320,0;Applet-401:944,16,192,64,0…
ItemGeometries-1229x768=Applet-456:0,96,272,192,0;Applet-458:0,288,608,352,0…
…
  1. Find the line that pertains to your screen resolution - in my case its going to be ItemGeometries-1920x1200, and then look along that lines for the ; delimited geometry definition of the applet you are looking for, in my case it looks like this:
Applet-456:1488,768,400,368,0;

The numbers after the colon are “X position”, “Y position”, “width”, “height”, “something else which should always be 0”.

  1. Change the numbers how you see fit (except the last - keep that always as “0”), and save the file. Note that Plasma Shell itself will be modifying this file constantly, so if Kate says the file has changed and you need to reload it - do so.
  2. Run qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.refreshCurrentShell to tell Plasma to reload the configuration file - this will freeze the shell for a few seconds, then black it out and reload it - on my system the whole process takes like 10 seconds.

I don’t think doing this is a good idea, but you do you :person_shrugging:

Thanks, I will probably not be doing this though :slight_smile:
At worst, the widgets disconnecting is a minor inconvenience.