I'm usually using 4 virtual desktops and I like to keep the so-called pager widget in the taskbar, which shows which desktop I'm currently looking at.

But the widget is relatively large:

enter image description here

Is there a way to decrease the width of the desktop symbols in the pager widget?

My plasmashell version is 5.12.8.

  • 1
    There may be a way. See, for example, askubuntu.com/q/1094113/248158 and this link. – DK Bose Aug 7 at 15:35
  • 2
    Thanks! I haven't found the correct line in the main.qml file yet but this looks really promising! – JBGruber Aug 7 at 16:21
  • 1
    More reading here: zren.github.io/kde/docs/widget – DK Bose Aug 9 at 14:35
  • Thanks again! I'll have a look. I updated the question to reflect my progress on this. But this might be more work than it's worth. – JBGruber Aug 9 at 15:27
  • 1
    @DKBose I solved it! Finally found the line I needed to change :) – JBGruber Aug 12 at 17:15

Just open systemsettings and choose "Desktop Behavior" -> "Virtual Desktops" and make it two Rows. The widget will adjust to half width and the four desktops will be shown in two rows as shown in the screenshot (it seems a little bit wide because I have 3 monitors).

You don't really need to modify the code. :)

KDE Virtual Desktops

  • Thanks! You are right that the widget gets much smaller and I like how simple it is. But it changes the arrangement of the desktops which I don't like. – JBGruber Aug 12 at 17:13

I figured it out with massive help from @DKBose!

Here are the steps

1. make backup of config file

sudo cp /usr/share/plasma/plasmoids/org.kde.plasma.pager/contents/ui/main.qml /usr/share/plasma/plasmoids/org.kde.plasma.pager/contents/ui/main.qml_backup

2. edit config using favourite editor (I simply use kate)

kate /usr/share/plasma/plasmoids/org.kde.plasma.pager/contents/ui/main.qml

3. Change the width of each desktop symbol (I simply add / 2 at the end of the line to get half the original width):

property int columnWidth: Math.floor(rowHeight * pagerItemSizeRatio) / 2

4. Change the minimum width of the whole widget (again just adding / 2, this time after aspectRatio):

Layout.minimumWidth: !root.vertical ? Math.floor(height * aspectRatio / 2) : 1

And here is the result:

enter image description here

(5.) In case anything goes wrong just copy the backup file back into location:

sudo cp /usr/share/plasma/plasmoids/org.kde.plasma.pager/contents/ui/main.qml_backup /usr/share/plasma/plasmoids/org.kde.plasma.pager/contents/ui/main.qml

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.