Ubuntu – How to change the text size of bookmarks in Files / Nautilus

18.04bookmarksgtknautilusthemes

I have a bunch of bookmarks in Files/Nautilus and would like to reduce the text size of/space taken up by the entries in the left hand bookmarks column, so that I don't have to scroll to access those at the bottom of the list (I use a trackball mouse that has no scroll wheel).

screenshot of Files/Nautilus

Is this possible? If so, how?

Best Answer

Ubuntu 18.04 Radiance Theme..

add the below content under the last line in /usr/share/themes/Radiance/gtk-3.20/apps/nautilus.css file. change the font-size value 12px to your preferred size.

/* for side bar reduced text size */

.nautilus-window placessidebar.sidebar row.sidebar-row {
    font-size:12px; }

button.sidebar-button {
    min-width: 2px;
    min-height: 2px;
    margin-top: 0px;
    margin-bottom: 0px;
    padding: 0;
}

open other file /usr/share/themes/Radiance/gtk-3.20/gtk-widgets.css and find the below content in around line number 2201.

placessidebar.sidebar row.sidebar-row {
    color: shade(@places_sidebar_fg_color, 0.9);
    background-image: none;
    background-repeat: no-repeat;
    background-position: top left;
    background-color: transparent;
    min-height: 12px;
    border:none;
    text-shadow: none;
}

here i have already changed min-height to 12px to match with font-size as we already declared in nautilus.css file above.

save the files and reboot to see the change.

Radiance Theme after configuration:
enter image description here

Note: Different GTK themes have different type of arrangements like everything is configured in a single file or some themes like Radiance theme have separate apps folder and nautilus.css file in it. you may have to do trail and errors with the key lines like .nautilus-window placessidebar.sidebar row.sidebar-row and other fields too as mentioned in above codes.

other configured theme.
enter image description here

Edit: for Adwaita Dark Theme, you can add the same content under the line @import url("resource:///org/gtk/libgtk/theme/Adwaita/gtk-contained-dark.css"); in /usr/share/themes/Adwaita-dark/gtk-3.0/gtk.css file

@import url("resource:///org/gtk/libgtk/theme/Adwaita/gtk-contained-dark.css");

/* for side bar reduced text size */

.nautilus-window placessidebar.sidebar row.sidebar-row {
    font-size:12px; }

button.sidebar-button {
    min-width: 2px;
    min-height: 2px;
    margin-top: 0px;
    margin-bottom: 0px;
    padding: 0;
}

placessidebar.sidebar row.sidebar-row {
    color: shade(@places_sidebar_fg_color, 0.9);
    background-image: none;
    background-repeat: no-repeat;
    background-position: top left;
    background-color: transparent;
    min-height: 12px;
    border:none;
    text-shadow: none;
}

enter image description here

Related Question