How to change the Plasma system menu height

Updated: November 15, 2021

By and large, in the Plasma desktop environment, you will rarely need to resort to command line tricks to make your system look and behave how you like. Unfortunately, sometimes, issues do occur, and you need to dabble in behind-the-scenes configuration files. Like say pinning WINE app icons or system area icon spacing. Today, we're facing another problem that shall takes us into the nerdy world of terminal windows and changes not visible through the lovely System Settings utility.

The issue is with the standard Plasma menu (application launcher). Normally, it shows a list of categories on the left, in a sidebar, and the applications on the right, in the big pane section. With most distros, the list of categories seldom exceeds the vertical dimension of the menu, so there is never an ugly scrollbar there. But sometimes, there might be one, and it could feel out of place. If you want to stretch the menu vertically, well, there isn't a configuration option anywhere. Hence, this tutorial.

Teaser

Solution

Until Plasma gains an option to customize the height of the menu, we will do something very similar to what we did with the system area icon spacing in the Plasma desktop before version 5.19. We will copy the relevant plasmoid into our home directory, and edit the QML file. Then, we will restart the Plasma shell.

The plasmoid that controls the system menu is called kickoff, and it resides here:

/usr/share/plasma/plasmoids/org.kde.plasma.kickoff

Copy it into your home directory:

mkdir -p /home/"username"/.local/share/plasma/plasmoids/
cp -r /usr/share/plasma/plasmoids/org.kde.plasma.kickoff /home/"username"/.local/share/plasma/plasmoids

Now, navigate to the plasmoids sub-directory that you just copied, and open the following file:

org.kde.plasma.kickoff/content/ui/FullRepresentation.qml

Inside this file, change the height multiplier factor for the layout minimum height:

Item {
    id: root
    Layout.minimumWidth: Math.round(PlasmaCore.Units.gridUnit * 26 * 1.5)
    Layout.maximumWidth: Layout.minimumWidth

    Layout.minimumHeight: PlasmaCore.Units.gridUnit * 30
    Layout.maximumHeight: Layout.minimumHeight

By default, the multiplier is set to 30. You can use anything, like 33, 45, 50, etc.

Item {
    id: root
    Layout.minimumWidth: Math.round(PlasmaCore.Units.gridUnit * 26 * 1.5)
    Layout.maximumWidth: Layout.minimumWidth

    Layout.minimumHeight: PlasmaCore.Units.gridUnit * 45
    Layout.maximumHeight: Layout.minimumHeight

File edit

Restart your desktop environment - reboot, logout/login, Plasma shell restart. You can do it via Krunner. Alt + F2, the Krunner will then show up at the top of the screen, and you can run the following command:

killall plasmashell && kstart plasmashell

Or alternatively:

plasmashell --replace

And the results become:

Default height

New height

Conclusion

We can rest and relax, as we pay another tribute to the OCD demons. But you have to admit, even with the little snags and problems here and there, the Plasma desktop still gives you an amazing range of options that you can change, tweak and customize to your liking. And at the same time, it still manages to look good, behave reasonably, and not diverge from being posh, elegant and consistent.

In general, QML-ing allows you to really go wild and make any which change you like to your desktop. Editing the private, local copy of the relevant plasmoid files also means that your tweaks are fully reversible, so if you do something naughty, you can go back to system defaults. Very handy and convenient. Anyway, system menu height (or width if you like), sorted. And we're done.

Cheers.

You may also like: