How to increase the spacing between items in the left sidebar of Nemo file manager?
Yes, you can increase that spacing by adding these two lines of code to the gtk.css
file:
.nemo-window .sidebar .cell {
padding: 2px; }
However, it would be better to put them in a separate css file, especially if you plan to make further changes in the future:
-
Create a folder named
.themes
in your home directory.mkdir -p ~/.themes
-
Let's say you are using the
A-theme
(no pun intended) in/usr/share/themes
, copy the folder containing that theme to the.themes
folder just created.cp -r /usr/share/themes/A-theme ~/.themes
-
Go to the
gtk-3.0
folder in~/.themes/A-theme
, then create a new folder namedapps
.mkdir -p ~/.themes/A-theme/gtk-3.0/apps
-
Create a file named
nemo.css
in thatapps
folder (usinggedit
):gedit ~/.themes/A-theme/gtk-3.0/apps/nemo.css
Put the two lines of code mentioned at the beginning into the file and save it.
-
Go back to the
gtk-3.0
folder, then open thegtk.css
file (usinggedit
):gedit ~/.themes/A-theme/gtk-3.0/gtk.css
Add this line to the end of the file and save it:
@import url("apps/nemo.css");
-
Issue the following commands to reset the theme (or use
gnome-tweak-tool
orunity-tweak-tool
):gsettings set org.gnome.desktop.interface gtk-theme 'A-theme' gsettings set org.gnome.desktop.wm.preferences theme 'A-theme'
Notes:
- If there is a folder named
gtk-3.20
in~/.themes/A-theme
, then you have to repeat step 3 to 6 for that folder. - You can increase or decrease the
padding
value (in the second line) for more or less spacing. I usually set it to2px
or1px
. - Sometimes the change won't take effect immediately even after resetting the theme. In such cases, resetting your icon theme can fix the problem.
Based on the answers from this and this.