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.