How to fix KDE6's system tray to use two lines (without making your panel huge)
Recently when setting up a new laptop, it came with Windows 11 on it, so of course there's no way I'm using that, so I decided this laptop would be full Linux with no Windows dualboot, at least initially (I have left the option open to add 10 LTSC as a dual boot, but haven't done so yet and honestly probably won't bother unless it's a very specific software requirement).
I'm using KDE 6, and mostly really enjoying it, it's been a big improvement over older KDE versions, particularly in performance on battery on a laptop, but one thing really, really annoys me by default to the point I almost switched back to XFCE before I found a workaround: The system tray.
I always set my task switcher up in a way that may date me a bit - I just can't stand Win11-style tiny program icons with popup menus of windows; I want to be able to see all of my windows at once, preferably with titles. So, I set up my task switcher as two rows so I can have reasonable tiles per-window with the window title visible. However, this causes a major problem - KDE6's system tray is not responsively designed, and on making a taller two-row panel, it remains as a single row of GIANT icons, consuming a huge amount of horizontal space.
I can force it to become two rows by increasing my panel height, but doing do makes the panel take up way too much screen real estate, meaning I would have to resort to other workarounds I hate like autohiding. I've found that on this laptop with a 1920x1200 display, 50-54px is the optimal range for me in general, but I need to go up to at least 68px to get two rows. This increased height means the icons are also still rendered annoyingly largely, and it makes other controls such as the workspace switcher also take up excessive space as a result.
There is no configuration option to use two lines, but I found a workaround.
Disclaimer: This tip is current and accurate as of early December 2025 for Void Linux, with KDE 6.5.2 on Wayland. I can not make any guarantees this will work on your system, Void or otherwise, and quite honestly, I'm really not a GUI enjoyer in most contexts; they're a means to an end to me, and I almost certainly will not be able to answer questions about your specific system and what is different - perhaps take it up with the KDE maintainers instead of me. Thanks. In the same vein, this shit is magic to me - I hate working on code for GUIs and found this solution after hours and hours of hacking on it and "almost there" attempts with weird edge cases. I have been using this hack for around a month now, and it has not broken yet, but I can not guarantee it is bug-free. As always, trying random hacks you found on the internet is your own risk, etc. That said, if you do have anything significant to add, I'm happy to hear it and will update this post if needed.
Fortunately, KDE allows you to override UI elements by copying them to your local home directory.
cp -r /usr/share/plasma/plasmoids/org.kde.plasma.systemtray ~/.local/share/plasma/plasmoids/
Now edit ~/.local/share/plasma/plasmoids/org.kde.plasma.systemtray/contents/ui/main.qml.
Find the following line (was line 192 for me but YMMV):
readonly property int rowsOrColumns: autoSize ? 1 : Math.max(1, Math.min(count, Math.floor(gridThickness / (smallIconSize + Kirigami.Units.smallSpacing))))
Replace it with:
readonly property int rowsOrColumns: autoSize ? 1 : 2
Now restart plasmashell (killall plasmashell && plasmashell & disown), or just log out and back in, and you should have a system tray that actually makes good use of space.
This seems like a regression from KDE5 (Bug #355587), and probably deserves an upstream fix; I would probably try and make a PR for this, but I am not sure given the simplicity of the fix if this is actually intentional suck or something. I'm also a complete beginner at QML, and don't feel confident that I didn't break anyone else's edge case, and wouldn't be able to justify it in a review, so if someone else wants to take it and run with it, go ahead; all I ask is to just tag @SiteRelEnby on github if you do ;).