10

I am using ubuntu 20.04 LTS. I don't know how I did this, but I tried to customize my dock settings using dash to dock extension. But then I realized that the space between 2 icons on the dock is too much and I don't like it. I need the default values. There isn't any option in the dconF-editor also. As you can see in these images, there is a huge space between my dock icons. Is there any method to correct this?

This is how my dock appears

This is how my dock appears

This is the default dock

This is the default dock

Nadeesha
  • 101

3 Answers3

7

You can do this following these two steps described below -

  1. Change dashToDock extension setting -

    a. open dconf editor

    b. go to org/gnome/shell/extensions/dash-to-dock/

    c. turn on custom-theme-shrink

  2. Now you have to change theme css file -

    a. now go to /usr/share/themes/Yaru-dark/gnome-shell/

    (I'm assuming that you are using Yaru-dark shell theme)

    b. open gnome-shell.css file in a text editor

    c. search these lines of code -

    #dashtodockContainer.shrink .dash-item-container > StButton, #dashtodockContainer.dashtodock .dash-item-container > StButton {
    padding: 2px 4px !important; }
    

    d. change padding to -

    padding: 0px 0px !important;
    

Now restart your gnome-shell by pressing Alt+f2 and then running r command

1

If you're using a theme go to /home/{user}/.themes/{theme name}/gnome-shell/gnome-shell.css

or for system theme go to /usr/share/gnome-shell/theme

find this line of code

  #dashtodockContainer .show-apps .overview-icon {
  padding: 4px;
  background-size: contain;
}

and change padding to whichever value suits you. Log out and log back in.

0

if you're using dash to dock extension put this at the bottem of gnome-shell/extensions/dash-to-dock/stylesheet.css

#dashtodockContainer .overview-icon {
padding-top:2px;
padding-bottom:2px;
padding-right: 1px;
padding-left: 1px;
}

#dashtodockContainer.icon { padding-top:1px; padding-bottom:1px; padding-right: 1px; padding-left: 1px; border-radius: 0px;/for square border / }

then reload using alt+f2 and r

source

Also change the outermost border using

#dashtodockContainer.shrink .dash-item-container > StButton,
#dashtodockContainer.dashtodock .dash-item-container > StButton {
padding: 1px 2px; /* padding between icon borders */
}