Ubuntu 18.04: Change color of window title bar

16,760

Solution 1

This works for me (Ubuntu 18.04 + Gnome 3.28.1):

nano ~/.config/gtk-3.0/gtk.css

To customize the active title bar background colors use .titlebar and .backdrop (for inactive windows).

.titlebar {
    background: #3089FF;
    color:white; 
}

.titlebar:backdrop  {
    background: #777777;
    color:white;
} 

After saving the file, remember refresh gnome using this command:

setsid gnome-shell --replace

Solution 2

A very simple way to make the color of the title bar different, is to choose a different theme, that does take this aspect into account (why the default one doesn't, beats me).

To change the default theme, install Gnome Tweaks (sudo apt install gnome-tweaks), then choose a theme like Adwaita:

Gnome Tweaks change theme

Share:
16,760

Related videos on Youtube

Old Geezer
Author by

Old Geezer

Don't shoot the messenger. An expert, or teacher, is a person who, after reading your question, knows what you know, what you don't know, what you are trying to know, and what else you need to know in order to achieve what you are trying to know.

Updated on September 18, 2022

Comments

  • Old Geezer
    Old Geezer over 1 year

    Is it possible to make the color of the title bar of the active window different from the rest?

    Right now it's black for all windows in my default set-up. I am unable to determine if I can start typing as I don't know which the focused window is.

    • trozen
      trozen about 4 years
      Maybe someone will find that useful: for Ubuntu 20.04 I've forked and modified the original yaru theme, just clone github.com/trozen/yaru and follow install instructions in CONTRIBUTING.md
  • JonnyRaa
    JonnyRaa almost 5 years
    I also had a gtk-4.0 folder here, however putting it in there has no effect, 3.0 is the way to go. Thanks! You can also restart gnome shell with Alt+F2 and then typing 'r'
  • Rudy Vissers
    Rudy Vissers over 4 years
    To avoid any misunderstanding, on Ubuntu 18.04.1, the file ~/.config/gtk-3.0/gtk.css did not exist. You have to create the file. The configuration above does paint the active title bar (the window that has the focus) in a nice blue and the not active in grey. The text is in white. It is a good solution and IMHO better than replacing the theme Ambiance by Adwaita. Certainly a question of taste.
  • Rudy Vissers
    Rudy Vissers over 4 years
    @Wonko the Sane, the color of the title bar of the file manager (Nautilus) does not change and it is of course annoying.
  • Wonko the Sane
    Wonko the Sane over 4 years
    @RudyVissers Agreed. Perhaps someone who works on the Nautilus project can assist with that.
  • Puspam
    Puspam about 4 years
    This trick worked. Thanks a lot.
  • Grant Birchmeier
    Grant Birchmeier about 2 years
    Works in 20.04. Also should be explicitly noted: You have to create gtk.css if it's not already present.