KDE pager widget change size

I'm usually using 4 virtual desktops and I like to keep the 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.

6

2 Answers

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

1

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/ /usr/share/plasma/plasmoids/

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

kate /usr/share/plasma/plasmoids/

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/ /usr/share/plasma/plasmoids/
5

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like