[SOLVED] Change xfce csd title bar font color

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
User avatar
rattkjelke
Level 3
Level 3
Posts: 196
Joined: Wed Jul 13, 2011 5:55 pm
Location: USA

[SOLVED] Change xfce csd title bar font color

Post by rattkjelke »

Is there a way to change the xfce client-side decoration window titlebar font color in LM 20.2?
Look at this:
Screenshot_2021-07-09_09-40-50.png
Screenshot_2021-07-09_09-40-50.png (33.56 KiB) Viewed 3654 times
This is effing ridiculous. It looks greyed out and that was the active focused window.
I want to change the font color to black for the focused active window.
Which .css or config file contains the settings for this?
I can change the foreground and text colors in most of the themes but I can't find it for CSD.

Alternatively, is there a way to totally disable CSD and use normal window decorations?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Change xfce csd title bar font color

Post by Flemur »

rattkjelke wrote: Fri Jul 09, 2021 10:58 amAlternatively, is there a way to totally disable CSD and use normal window decorations?
This might work:
"gtk3-nocsd is a small module used to disable the client side decoration of Gtk+ 3."
https://github.com/PCMan/gtk3-nocsd

Edit:
I don't see csd on many xfce programs (terminal, thunar), but here's what gtk3-nocsd looks like on a csd program - not really great, you still get the dopey looking csd so it's not completely disabled, and the controls are on a real titlebar, which uses the correct (fluxbox) font:
Before:
csd1.jpg
After:
csd2.jpg
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
GeneBenson
Level 4
Level 4
Posts: 357
Joined: Fri Sep 17, 2010 9:55 pm

Re: Change xfce csd title bar font color

Post by GeneBenson »

Hi rattkjelke,

In Settings -> Appearance -> Style tab try another theme. Adwaita gives me what I believe you are looking for. Also any theme in the Mint-Y series.
User avatar
rattkjelke
Level 3
Level 3
Posts: 196
Joined: Wed Jul 13, 2011 5:55 pm
Location: USA

Re: Change xfce csd title bar font color

Post by rattkjelke »

I don't want to use another theme.
I want to find the config file(s) that controls the font color of the CSD headerbar or titlebar or whatever it is called so I can fix the defective themes.

I'm totally with Dedoimedo on this. Developers should have more sense than to use grey fonts on a grey background.
You shouldn't have to go in and change all the font colors so they are readable.
I don't know if this is a LM or Xfce problem.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Change xfce csd title bar font color

Post by Flemur »

rattkjelke wrote: Sat Jul 10, 2021 10:09 am I don't want to use another theme.
I want to find the config file(s) that controls the font color of the CSD headerbar or titlebar or whatever it is called so I can fix the defective themes.
GtkHeaderBar, I think. Or perhaps XfceTitledDialog.

libxfce4ui-nocsd :
https://aur.archlinux.org/packages/libxfce4ui-nocsd/

I have Arch (not an Xfce desktop, but have some apps), so I'll try that and report back.

1: AUR libxfce4ui-nocsd wants:
Total Download Size: 38.34 MiB
Total Installed Size: 182.72 MiB
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Change xfce csd title bar font color

Post by Flemur »

Replacing libxfce4ui with libxfce4ui-nocsd...
Before (here, green is the desktop background) :
xfce4-about_CSD1.jpg
After (here, green is the titlebar color, which I make the same as the background to be perverse):
xfce4-about_CSD2.jpg
...looks likt it did the same thing as gtk3-nocsd ...
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
rattkjelke
Level 3
Level 3
Posts: 196
Joined: Wed Jul 13, 2011 5:55 pm
Location: USA

Re: Change xfce csd title bar font color

Post by rattkjelke »

Flemur wrote: Sat Jul 10, 2021 11:30 am Replacing libxfce4ui with libxfce4ui-nocsd...
That doesn't work. All it does is it adds a xfwm4 titlebar and frame around the CSD.
I want to change the CSD font color.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Change xfce csd title bar font color

Post by Flemur »

rattkjelke wrote: Sat Jul 10, 2021 11:39 am
Flemur wrote: Sat Jul 10, 2021 11:30 am Replacing libxfce4ui with libxfce4ui-nocsd...
That doesn't work. All it does is it adds a xfwm4 titlebar and frame around the CSD.
Well, it DOES provide a normal titlebar using the font from the theme; unfortunately it doesn't remove the wasted-space CSD stuff.

The results of gtk3-nocsd, as above, on Arch look a bit different than libxfce4ui-nocsd (my previous post w/2 pics):
gtk3-nocsd:
xfce4-about_CSD3.jpg
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
rattkjelke
Level 3
Level 3
Posts: 196
Joined: Wed Jul 13, 2011 5:55 pm
Location: USA

Re: Change xfce csd title bar font color

Post by rattkjelke »

This is Linux Mint. I don't care about Arch or what it looks like.
ajgringo619

Re: Change xfce csd title bar font color

Post by ajgringo619 »

Settings --> Window Manager --> Style:
xfce-window-manager.jpg
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Change xfce csd title bar font color

Post by Flemur »

rattkjelke wrote: Sat Jul 10, 2021 4:52 pm This is Linux Mint. I don't care about Arch or what it looks like.
Good luck!
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Change xfce csd title bar font color

Post by Flemur »

ajgringo619 wrote: Sat Jul 10, 2021 6:23 pm Settings --> Window Manager --> Style:
As far as I can tell each app decorates its own window, not the window manager. Plenty of people have complaints similar to the OP's.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
ajgringo619

Re: Change xfce csd title bar font color

Post by ajgringo619 »

Flemur wrote: Sat Jul 10, 2021 6:50 pm
ajgringo619 wrote: Sat Jul 10, 2021 6:23 pm Settings --> Window Manager --> Style:
As far as I can tell each app decorates its own window, not the window manager. Plenty of people have complaints similar to the OP's.
On my system, the only window that doesn't use these settings is my browser (Brave), and that's only because I have system title bars disabled. Even the webapp windows have the same title bars as the rest. Maybe XFCE is different.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Change xfce csd title bar font color

Post by Flemur »

ajgringo619 wrote: Sat Jul 10, 2021 7:22 pm Maybe XFCE is different.
They just made xfce all or mostly CSD (tho thunar and some others look normal)

https://www.xfce.org/about/news/?post=1608595200
"Furthermore all settings dialogs now use window decorations drawn by Gtk (client side decorations)."
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
rossdv8
Level 7
Level 7
Posts: 1736
Joined: Wed Apr 23, 2014 4:48 am
Location: Within 2,000 kilometres of Alice Springs, Australia
Contact:

Re: Change xfce csd title bar font color

Post by rossdv8 »

That means you could probably edit the .css in the case of Gtk-3 themes, or the gtkrc file for gtk-2

Some Gtk themes have their .css files self contained in the their individual theme folder.
Some. like Adwaita-Duck have a single .css file in their theme folder that then imports a .css file from somewhere.
In the case of the Add water Duck theme it gets the .css from:
resource:///org/gtk/libgtk/theme/Adwaita/gtk-contained-dark.css

It is a normal .css, but pretty complex because it defines all aspects of the widgets for that particular theme in Gtk.

Of course, if you did change the Titlebar font colour (it has to be in there somewhere) you then have to export it back again.
Good luck with THAT !

I pasted the .css code here as an example, but at 176882 characters it was a little long for a single post :lol:
Current main OS: MInt 21.3 with KDE Plasma 5.27 (using Compiz as WM) - Kernel: 6.5.0-15 on Lenovo m900 Tiny, i5-6400T (intel HD 530 graphics) 16GB RAM.
Sharks usually only attack you if you are wet
User avatar
rattkjelke
Level 3
Level 3
Posts: 196
Joined: Wed Jul 13, 2011 5:55 pm
Location: USA

Re: Change xfce csd title bar font color

Post by rattkjelke »

rossdv8 wrote: Sun Jul 11, 2021 1:09 am That means you could probably edit the .css in the case of Gtk-3 themes, or the gtkrc file for gtk-2
Yes, If I knew which file CSD uses.
rossdv8 wrote: Sun Jul 11, 2021 1:09 am Some Gtk themes have their .css files self contained in the their individual theme folder.
Some. like Adwaita-Duck have a single .css file in their theme folder that then imports a .css file from somewhere.
This greyed out font only happens when you use one of the Mint-X themes. The others aren't quite as bad.

The /xfwm4/themerc files have "active_text_color" that controls the window manager title bar text but it has no effect on the CSD header bar.

I looked at all the .css and rc files in the /usr/share/themes/ folders. I couldn't see anything like "GtkHeaderBar" or "titlebar" with color values so that probably means it is being imported from someplace else. I have no idea where or how to find it. If I knew the hex value of the pale grey color I could search file contents for it, but I can't even determine that with a color picker because of the font shadowing and hinting.
User avatar
secureIT
Level 4
Level 4
Posts: 471
Joined: Wed Dec 05, 2018 1:26 pm

Re: Change xfce csd title bar font color

Post by secureIT »

I found no way changing the csd title bar font color.

e.g. Mint-X-Aqua has no xfwm4 folder.

But there are other themes that could be customized by hand.

That concerns every theme that is listed into graphical-settings-management > window-management.

You can change the titlebar font-color in this way :

go to filesystem/usr/share/themes/

right click on a theme-folder and copy it

then paste it to your home into the hidden folder :

home/yourname/.themes

if .themes does not exist - simply create it.

after that rename the theme-folder to themename-Custom

Now open the folder and navigate to the sub-folder xfwm4

Open it and you will find a file called : themerc

Edit themerc
there you will find an entry called : active_text_color=#
the letters and numbers after the # character determine the color of the text.

You can change the entry with RGB color entries of your choice.
some examples that you can use e.g. from a color-picker:
3008f0 is blue
f00820 is red
000000 is black

by the way : a very good color-picker is part of yad.
So if yad is installed on your system :
open a terminal and enter :
yad --color
and the color picker will show up.

Now close the file themerc und and confirm the change.

After that log out - and log in again.

Now open graphical-settings-management > window-management
and you can choose the themename-Custom

Image

Image

Image
.
User avatar
rattkjelke
Level 3
Level 3
Posts: 196
Joined: Wed Jul 13, 2011 5:55 pm
Location: USA

Re: Change xfce csd title bar font color

Post by rattkjelke »

Yad color picker doesn't work in this case because when you select the eyedropper pick tool it keeps yad's window focused. I can't cycle windows or raise one with CSD to pick the color.

I already tried gpick and GIMP's color picker and the same thing happens.
michael-hi
Level 4
Level 4
Posts: 302
Joined: Sun Mar 19, 2017 2:31 pm

Re: Change xfce csd title bar font color

Post by michael-hi »

This problem of the text being grey rather than black probably affects other things as well if it is theme-related as you say. However, if your concern is just that title text in the CSD headerbar you could try adding some css code to your home folder at ~/.config/gtk-3.0/gtk.css (make sure Thunar is set to show hidden files and create the gtk.css file if it does not already exist).

For instance try adding this text in that file, then log out and back in:

Code: Select all

/* color of CSD headerbar text */
headerbar {
    color: black;
} 
If you want it black only for the active window, you could try something like the following. The colour can be in words as here for basic colours, or a hash sign # followed by the hex code for a specific shade:

Code: Select all

/* color of CSD headerbar text */
headerbar {
    color: black;
}

headerbar:backdrop {
    color: gray;
}
User avatar
secureIT
Level 4
Level 4
Posts: 471
Joined: Wed Dec 05, 2018 1:26 pm

Re: Change xfce csd title bar font color

Post by secureIT »

rattkjelke wrote: Sun Jul 11, 2021 12:02 pm Yad color picker doesn't work in this case because when you select the eyedropper pick tool it keeps yad's window focused. I can't cycle windows or raise one with CSD to pick the color.

I already tried gpick and GIMP's color picker and the same thing happens.
I tried that yad tool as seen in your first post with appearance > Mint-X-Aqua and window-management > Mint-X

I dont know , why the eyedropper pick tool keeps yad's window focused in your case.
for me the eyedropper pick tool can be moved across the entire screen.

I dont know, which color you prefer, and whether it has to be a color that is already displayed elsewhere on your screen.

But you can definitely choose any color also in the yad-color-picker.

Here's an example :

Image

The only thing you have to consider when making an entry in the themerc is the spelling:

so not: DB2C2C but: db2c2c
------------------------------------
but michael-hi’s proposal also looks good.
(I have not yet tried to see if it works)
.
Locked

Return to “Xfce”