[Cinnamon] Change WIndow Title Bar Color

Style your desktop
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
bloodfire1004

[Cinnamon] Change WIndow Title Bar Color

Post by bloodfire1004 »

Hello!

So I have been customizing my cinnamon theme but I cannot find an option how to change my window title bars. Im even using the cinnamon.css file. Does any of you know how to change the title bar color? If it is not editable, then it is a shame.

Thanks!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
PiMinto

Re: [Cinnamon] Change WIndow Title Bar Color

Post by PiMinto »

Would also like to know...
bimsebasse

Re: [Cinnamon] Change WIndow Title Bar Color

Post by bimsebasse »

For some reason Cinnamon developers don't get how unintuitive for newcomers the current scheme is :(

To change window themes:
1: Cinnamon Settings > Themes > Other Settings > Window theme ------ this changes your title bars and window borders
2: Cinnamon settings > Themes > Other Settings > GTK theme ------- this changes windows proper, you need to change both 1 and 2 for a full window theme change even though Cinnamon Settings in no way indicates that

Cinnamon Themes are for the shell (panel and overviews) and have no effect on window themes

You are welcome to file a github feature request to help the devs understand that this isn't very intuitive unless you're already a Linux geek: https://github.com/linuxmint/Cinnamon
zerozero

Re: [Cinnamon] Change WIndow Title Bar Color

Post by zerozero »

adding that for point 1 in your post above bim you need to Alt f2 r
Ginsu543

Re: [Cinnamon] Change WIndow Title Bar Color

Post by Ginsu543 »

Piggy-backing on what bimsebasse said, if you want to change the color of your window title bars, you may have to edit the appropriate configuration file under Metacity which is responsible for managing the window borders. Navigate to where your theme is installed (in my case /home/<my user name>/.themes/) and go into the "metacity-1" folder. Find the metacity-theme-1.xml and try changing the color settings under "<!-- Window Title -->". Since I've never done this myself, I don't know exactly which line to change.
arne-nl

Re: [Cinnamon] Change WIndow Title Bar Color

Post by arne-nl »

Thanks to the hints in this thread I managed to figure out how to do this.

These instructions are for the default Mint-X theme, but they you can use them to change other themes as well. It would be advisable to copy the default theme to your own theme, and change that. This makes sure any future automatic updates won't overwrite your customisation.

Code: Select all

cd /usr/share/themes
sudo cp -rp Mint-X Mint-X-customised
cd Mint-X-customised/metacity-1
sudo vi metacity-theme-1.xml
First we must define a new title bar background. Find the section:

Code: Select all

<draw_ops name="titlebar_gradient">
        <gradient type="vertical" x="0" y="1" width="width" height="22">
                <color value="shade/gtk:bg[NORMAL]/1.06"/>
                <color value="shade/gtk:bg[NORMAL]/1.0"/>
        </gradient>
</draw_ops>
Copy it and change the name, and replace the gtk:bg[NORMAL] with a color of your liking. For example:

Code: Select all

<draw_ops name="titlebar_gradient_focused">
        <gradient type="vertical" x="0" y="1" width="width" height="22">
                <color value="shade/#F8CA80/1.06"/>
                <color value="shade/gtk:bg[NORMAL]/1.0"/>
        </gradient>
</draw_ops>
Now find the section:

Code: Select all

<draw_ops name="round_titlebar">
        <include name="titlebar_gradient"/>
        <include name="border"/>
        <include name="corners_outline"/>
</draw_ops>
Copy it and change the name, and reference the new gradient you created above:

Code: Select all

<draw_ops name="round_titlebar_focused">
        <include name="titlebar_gradient_focused"/>
        <include name="border"/>
        <include name="corners_outline"/>
</draw_ops>
Finally, find the frame_style name="focused" and reference your new round_titlebar_focused:

Code: Select all

<frame_style name="focused" geometry="normal" parent="normal">
        <piece position="entire_background" draw_ops="round_titlebar_focused"/>
        <piece position="title" draw_ops="title"/>
              :
              :
Save the file, go to Cinnamon settings --> Themes --> Other settings --> Window theme and select your new theme.

As a final note my free opinion on this: it is ridiculous that you have to change this by diving under the hood. I have many windows open at any one time and clearly indicating the active window is basic good user interface design.
Locked

Return to “Themes, Icons & Wallpaper”