Change colour of title bar?

Forum rules
Before you post please read how to get help
Post Reply
tortoise
Level 1
Level 1
Posts: 4
Joined: Tue Mar 19, 2019 4:24 pm

Change colour of title bar?

Post by tortoise »

Hi,

I posted this in the newbie forum but didn't get an answer. Perhaps someone here can help?

I'm using mint 19.1 MATE edition and I'd like to know how I edit a theme to change the colour of the title bar? I'm currently using the Mint-Y-Red theme and would like to make the title bar of the active window red too but keep everything else the same.

I don't mind hand-editing xml or other config files if necessary, or editing some XPM images if necessary (that works for Mint XFCE edition, but not for MATE it seems).

michael-hi
Level 1
Level 1
Posts: 39
Joined: Sun Mar 19, 2017 2:31 pm

Re: Change colour of title bar?

Post by michael-hi »

I don't know the answer I'm afraid, but I'm always baffled that nobody seems to take this question seriously. Why does Linux make it so difficult to change the colour of the title bars/window borders? For any new users wanting to personalise their desktop, it's the first thing they would want to do after changing the background wallpaper. Linux Mint gives loads of choices for most things but assumes that everybody wants their title bar to be a drab grey colour.

I think you used to be able to change it in the MATE edition of Mint 18. The Mint-Y and Mint-X title bars were fixed grey but you could still choose one of those themes, then click Customize and match it with a different window style on the Window Borders tab. Some window options (like Dopple, I think) would then change colour to match the Mint-X or Y theme colour. Now in Mint 19.1 they don't.

So, I suppose the first suggestion is you could try downloading a MATE version of Mint 18 and see if that works. Maybe try an earlier version like 18 or 18.1 as I am not exactly sure when things changed. They are still supported until April 2021.

Or, better still, use Mint 19.1 XFCE instead! In that, you can choose a Mint-X or Y theme for Style and Icons and then match it with a different theme under the Window Manager settings. Most window themes are fixed but some (Daloa, Kokodi or Moheli) will change colour in line with the theme. Moreover, with XFCE, you can download the package called xfwm4-themes which will give you a wider range of window styles to choose from. Again, some but not all of these will change colour. For instance, I am using the basic Mint-Y theme for Style and Icons but Default-4.6 in the Window Manager settings.

Apologies again for not directly answering your original question but maybe there is someone out there who knows how to do it.

User avatar
smurphos
Level 15
Level 15
Posts: 5958
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Change colour of title bar?

Post by smurphos »

For MATE copy the folder /usr/share/themes/Mint-Y-Red to ~/.themes/Mint-Y-Red

Open the file ~/.themes/Mint-Y-Red/metacity-1/metacity-theme-2.xml in a text editor.

The quick and easy edit is to the first section where colour constants are defined.

Just change <constant name="C_wm_bg_focused" value="#d9d9d9" /> to <constant name="C_wm_bg_focused" value="#c15b58" />. Save and briefly switch themes back and forth. You might want to tweak the title colour and button colors for usability.

Code: Select all

<?xml version="1.0"?>
<metacity_theme>
<info>
	<name>Arc</name>
	<author>horst3180</author>
	<copyright>horst3180</copyright>
	<date>2015</date>
	<description>Arc Metacity theme</description>
</info>

<!-- meaningfull constants -->

<constant name="C_title_focused" value="#454545" />
<constant name="C_title_unfocused" value="#9d9d9d" />

<constant name="C_wm_bg_focused" value="#d9d9d9" />
<constant name="C_wm_bg_unfocused" value="#d9d9d9" />

<constant name="C_wm_highlight" value="#eeeeee" />

<!-- window button colors -->

<!-- close -->
<constant name="C_button_close_bg_focused" value="#c15b58" />
<constant name="C_button_close_bg_hover" value="shade/#c15b58/1.14" />
<constant name="C_button_close_bg_active" value="shade/#c15b58/0.8" />

<constant name="C_icon_close_bg" value="#F8F8F8" />

<!-- minimize, maximize -->
<constant name="C_button_bg_hover" value="#fdfdfd" />
<constant name="C_button_bg_active" value="#909090" />

<constant name="C_button_border_hover" value="#D1D1D1" />

<constant name="C_icon_bg_focused" value="#909090" />
<constant name="C_icon_bg_unfocused" value="#B6B6B6" />
<constant name="C_icon_bg_hover" value="#7A7A7A" />
<constant name="C_icon_bg_active" value="#ffffff" />
Any Cinnamon using readers with the Mint-Y themes this won't work for you. All of the Mint-Y variants share a common metacity-theme-3.xml file in either the base Mint-Y or Mint-Y-Dark folder.

Here the line (Mint-Y) <constant name="C_wm_bg_focused" value="rgba(217,217,217,1.0)" /> or (Mint-Y-Dark) <constant name="C_wm_bg_focused" value="rgba(47,47,47,1.0)" /> needs to be replaced with <constant name="C_wm_bg_focused" value="gtk:custom(selected_bg_color,#9ab87c)" /> to achieve the same basic effect as the edit described above for MATE.

Code: Select all

<?xml version="1.0"?>
<metacity_theme>
<info>
	<name>Arc</name>
	<author>horst3180</author>
	<copyright>horst3180</copyright>
	<date>2015</date>
	<description>Arc Metacity theme</description>
</info>

<!-- meaningfull constants -->

<constant name="C_title_focused" value="rgba(69,69,69,1.0)" />
<constant name="C_title_unfocused" value="rgba(157,157,157,1.0)" />

<constant name="C_wm_bg_focused" value="rgba(217,217,217,1.0)" />
<constant name="C_wm_bg_unfocused" value="rgba(217,217,217,1.0)" />

<constant name="C_wm_border" value="rgba(208,208,208,1.0)" />

<constant name="C_wm_highlight" value="rgba(238,238,238,1.0)" />
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

tortoise
Level 1
Level 1
Posts: 4
Joined: Tue Mar 19, 2019 4:24 pm

Re: Change colour of title bar?

Post by tortoise »

Thank you both! My windows now look exactly like I want (I removed the silly 1px white stripe at the top too).

User avatar
smurphos
Level 15
Level 15
Posts: 5958
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Change colour of title bar?

Post by smurphos »

tortoise wrote:
Fri Mar 29, 2019 4:50 pm
I removed the silly 1px white stripe at the top too
For the benefit of other readers I guess by changing...?

Code: Select all

<draw_ops name="titlebar_focused">
	<rectangle color="C_wm_bg_focused" x="0" y="0" width="width" height="height" filled="true" />
	<rectangle color="C_wm_highlight" x="0" y="0" width="width" height="1" filled="true" />
</draw_ops>
to

Code: Select all

<draw_ops name="titlebar_focused">
	<rectangle color="C_wm_bg_focused" x="0" y="0" width="width" height="height" filled="true" />
	<rectangle color="C_wm_bg_focused"" x="0" y="0" width="width" height="1" filled="true" />
</draw_ops>
or

Code: Select all

<draw_ops name="titlebar_focused">
	<rectangle color="C_wm_bg_focused" x="0" y="0" width="width" height="height" filled="true" />
</draw_ops>
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

tortoise
Level 1
Level 1
Posts: 4
Joined: Tue Mar 19, 2019 4:24 pm

Re: Change colour of title bar?

Post by tortoise »

The latter one (in fact I just commented the line out).

dld
Level 1
Level 1
Posts: 29
Joined: Sat Oct 29, 2011 4:12 pm

Re: Change colour of title bar?

Post by dld »

My problem and feelings exactly. Mint 18 had a "color" pick in the "Customize Theme"menu. Please bring it back.
However, I am trying to customize the Human-Clearlooks theme. Can similar changes be made to the gtkrc files I find in /usr/share/themes?

Post Reply

Return to “MATE”