How to rearrange the GNOME Adwaita default theme

Have you ever used the GNOME desktop? This is by far one of the best graphics environments to work with, and its developers have a nice taste for elegance and minimalism; in short, the GNOME DE is really so beautiful.

 

GNOME Desktop. The default Adwaita theme, but with thin bars
GNOME Desktop. The default Adwaita theme, but with thin bars

GNOME, by default, has incredible elegant themes

I’m a big fan of both Xfce and i3wm, but on all the desktops available for the Linux operating system, it’s clear that GNOME has managed to become one of the most efficient, elegant, and customizable.

If you need to understand more about the GNOME desktop environment, check the official website or the beginner’s guide to the GNOME desktop. GNOME 3 is available on most GNU/Linux distributions and is the default DE on 3 pillars: Fedora, openSUSE, and Ubuntu. If you don’t need more on this, let’s get started with the default theme topic.

GNOME 3 has been designed from the ground up to help you have the best possible computing experience and the graphical interface that it offers is quite simple and easy to use. Also, the default themes, Adwaita and Adwaita Dark, are two of the most incredible elegant and beautiful themes I ever saw. Every aspect of GNOME 3 has been crafted to fit together as a harmonious whole so that it offers a consistent and integrated experience.

 

In my personal taste, bars are too massive

So, as I said, the GNOME default themes are nearly perfects. I found only two (or three) annoying things: first of all, the too big and too fat bars. I mean top bars, header bars, title bars; every bar in GNOME is too thick.

I really need to make the thickness of GNOME bars smaller. So, to do that, we’ll make a couple of things. First, to customize your desktop, you need GNOME Tweaks (formerly GNOME Tweak Tool) and User Themes, the GNOME extension (install it from here) for loading shell themes from the user directory.

Create a folder (where you want) and name it as you like.

$ mkdir Adwaita-Slim

$ vi Adwaita-Slim/gnome-shell.css

Edit the file like the following:

@import url("/usr/share/gnome-shell/theme/gnome-shell.css");

/* GLOBALS */
stage {
font-family: FONT-YOU-LIKE, Cantarell, Sans-Serif;
font-size: 10pt;
color: #eeeeec; }

#panel {
background-color: #2C3133;
background-gradient-direction:none;
/* transition from solid to transparent */
transition-duration: 0ms;
font-weight: normal;
height: 21px; }

#panel .panel-corner {
-panel-corner-radius: 0px;
-panel-corner-background-color: transparent;
-panel-corner-border-width: 0px;
-panel-corner-border-color: transparent; }
#panel .panel-corner:active, #panel .panel-corner:overview, #panel .panel-corner:focus {
-panel-corner-border-color: transparent; }

#panel .panel-button {
-natural-hpadding: 12px;
-minimum-hpadding: 6px;
font-weight: bold;
color: #eeeeec;
text-shadow: none;
transition-duration: 0ms; }

#panel.solid {
background-color: #2C3133;
background-gradient-direction:none;
/* transition from transparent to solid */
transition-duration: 0ms; }
#panel.solid .panel-corner {
-panel-corner-background-color: transparent; }

#panel.solid .panel-button {
color: #eeeeec;
text-shadow: none; }

Save it and exit with :wq. And do this:

$ zip -rv Adwaita-Slim.zip Adwaita-Slim

Open GNOME Tweaks and on ‘Appearance tab’ select the ‘Shell’ element, open the path to the Adwaita-Slim.zip file and select it. Close the Tweaks app and the top bar is done.

For the bars of the windows, we need to do something different.

$ vi ~/.config/gtk-3.0/gtk.css

And write the following inside this file:

headerbar entry,
headerbar spinbutton,
headerbar button,
headerbar separator {
margin-top: 0px; /* same as headerbar side padding for nicer proportions */
margin-bottom: 0px;
}

headerbar {
min-height: 24px;
padding-left: 2px; /* same as childrens vertical margins for nicer proportions */
padding-right: 2px;
margin: 0px; /* same as headerbar side padding for nicer proportions */
padding: 0px;
}

Save it and exit with :wq. And restart the desktop with ALT+F2 and digit ‘r’ (R=Restart)inside the box. We are done also for the bars of the windows.

Last, but not least, because I prefer the dark variant of the Adwaita theme, we need to do an additional tweak in order that Firefox hasn’t some issues with dark themes. Input boxes become black on black, dark grey on dark grey or blue on blue, so it’s impossible to work inside websites with that theme and the web browser.

  • Open about:config in Firefox
  • Create a new String value with the right click and named it as widget.content.gtk-theme-override
  • Set Adwaita as the value or a GTK light theme of your choice

Now your GNOME user interface is dark, but Firefox will use a light theme for rendering the pages. Kudos to Moritz Kammerer for this amazing life-saving tip.

Restart Firefox and we have finished.

 

Bonus tips

In the video and screenshot above, I also change the icons and, instead of using the default GNOME icons, I used the SURU icons. You can find these icons on the SURU official repository.

Apart from that, I also used a ‘Unity style’ dock. You can get it, using the default shell theme of the Ubuntu distro or customizing the GNOME dock of any other distros (like Fedora and openSUSE) with the Dash to dock extension, a dock for the GNOME Shell. This extension moves the dash out of the overview transforming it in a dock for an easier launching of applications and a faster switching between windows and desktops. You can download it on the official Dash to dock extension webpage.