How to change Plasma system area icon spacing - 5.19 onwards

Updated: December 21, 2020

In my short review of Plasma 5.19, I mentioned a curious little problem I encountered - my systray suddenly got huge after an upgrade, taking a good two thirds of the panel. This wasn't caused by the desktop itself, but rather by a change in the systray plasmoid, which undid and made my manual spacing change wrong, spacing that I had introduced to work around the insufficient distance between system area icons made in one of the previous Plasma editions. Well now.

As it happens, my feeling is that the icon spacing in the new desktop environment is sufficiently airy not to require any additional changes. But just to be thorough, I decided to explore this venue a little, and found the rather interesting Plasma SysTray Tweaks for Latte plasmoid, made by the Latte Dock developer. It's time for see what this thing can do for our OCD demons. After me.

Plasma SysTray Tweaks for Latte setup

You may think the plasmoid will only work with the Latte Dock - nope. The name is a bit weird. What you need to do is: download the project, extract it, and then copy the two plasmoid into your home directory:

cp -r "archive"/org.kde.plasma.* ~/.local/share/plasma/plasmoids

Restart the Plasma shell (or simply log out and then log back in).

Right-click systray

Now, to configure and change the systray spacing, right-click on the expand arrow > System Tray Settings. Here, in addition to the usual Entries and Keyboard Shortcuts sections, there will also be the Appearance section, which lets you set the size of the icons in the system area (tray), as well as, importantly, the spacing between them.

Appearance

Examples, examples!

First, here we go, the default spacing in Plasma 5.19 - quite all right, really:

Default spacing

Once you install the plasmoid and restart your session, the icons will get all bunched up - similar to the problematic setting from a while back, which I wanted to remedy:

Installed, icons very close apart

And here's what happens when you change the size from default Small to SmallMedium:

Icon size changed

Then, we go to 5px spacing:

5px spacing

Then, 10px spacing - and you get the idea:

10px spacing

Conclusion

This is a short but satisfying article. There's nothing more pleasing to people with a high sense of aesthetics and order thank being able to sort things just right. Once again, Plasma proves its versatility and flexibility, although this functionality is sort of an add-on really. But then, the amount of things the desktop lets you do, out of the box, without command line hacks, is rather astounding. Thinking out loud, scrollbars and icon spacing in the system tray are the only two "bad" cases that I can think of.

Well, there you go. The whole Latte combo is quite useful, and proving more interesting by the day. The Latte developer has already provided a whole bunch of useful tools and features - as you can see from my Mac and Unity transformation guides (just read the Unity one linked above, and all will be revealed), and this is another nice example. Anyway, if Plasma 5.19 disrupted your systray chakras, here's the remedy. Take care.

Cheers.