how to make gnome window title bar smaller

Gnome how to make windows title bar smaller

How to make Gnome 42 windows title bar smaller

By default, the Gnome window title bar is too high. This tutorial will show you how to make the menu bar smaller. Before I post the CSS rules which make the Gnome title bar smaller, I want to mention that this was tested on four different computers all running Gnome 42.

If you feel that the Gnome title or window top bar is too high then paste the following CSS code into your gtk.css file.

how to make gnome window title bar smaller
Add a gtk.css to make the Gnome window bar smaller

Create the gtk.css file

There are several ways to do this. Experienced users will simply use vim or nano or touch to create the gtk.css file inside home/username/.config/gtk-3.0 directory.
Those who are still new to the Gnome desktop need to first open the Text Editor and copy paste the following lines into a new file.

headerbar entry,
headerbar spinbutton,
headerbar button,
headerbar separator {
margin-top: 0px;
margin-bottom: 0px;
headerbar {
min-height: 24px;
padding-left: 2px;
padding: 0px;

Safe the gtk.css file

When done, safe the file into the following directory.
Open your Gnome file browser and navigate to: home > .config > gtk-3.0
Save the file with this name: gtk.css

To see the change, you must log out of Gnome first. Upon logging in again, the big ugly window borders will be gone.

How to undo the changes

If, for some reason, you are not happy with this tweak then you can simply delete the gtk.css file, log out/in and everything will revert to as it was.

Bonus Gnome tweak

Now that the gtk.css file was created inside the home .config gtk-3.0 directory, we can add more CSS rules to give our Terminal a bit of padding. This way, the text does not start right away at the window borders.

Here are the CSS rules which will increase the margins from zero to six pixels. You can change the number 6 to any size you like but 6 is a good start.

decoration {box-shadow: none;}
terminal-window {
padding: 6px 6px 6px 6px;
-vte-terminal-inner-border: 6px 6px 6px 6px;

Again, save the gtk.css file and log in/out to see the changes. Upon opening the terminal you will see the new padding applied.

If you are not happy with your current operating system and in the mood to experiment with something different then check out my blog article Why Linux and why Fedora.
My productivity has gone way up since switching to Fedora and now that I have tweaked the Gnome desktop to my liking, I actually enjoy working with Gnome.

Can you share this article?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.