Xfce Forum

Sub domains
 

You are not logged in.

#1 2014-03-19 00:04:20

elias4444
Member
Registered: 2014-03-18
Posts: 3

Override for Panel Font Colors

Is there a way to override the font colors in the panels and set them differently than what the theme specifies?

I know similar questions have been asked before, and the typical response is to use an inverted color theme like XFCE-Dusk, but...

I like having light colored windows with dark or completely transparent panels for my environment. It feels familiar and helps "open up" the entirety of the screen to my eyes. Problem is, if I use a an inverted color theme then everything is dark and it hurts my eyes. If I use a bright colored theme, then the panels are bright and bother me. Yes, I know I'm picky, but that's what I'd like to accomplish if possible. Is there a way?

Offline

#2 2014-03-19 00:20:41

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 1,271

Re: Override for Panel Font Colors

You can use a program like gtk-theme-config or create an ~/.gtkrc-2.0 file with the following content:

style "gtk-theme-config-panel" {
	bg[NORMAL] = "#000000"
	bg[PRELIGHT] = shade(1.1,"#000000")
	bg[ACTIVE] = shade(0.9,"#000000")
	bg[SELECTED] = shade(0.97,"#000000")
	fg[NORMAL] = "#729fcf"
	fg[PRELIGHT] = "#729fcf"
	fg[SELECTED] = "#729fcf"
	fg[ACTIVE] = "#729fcf"
}

widget "*PanelWidget*" style "gtk-theme-config-panel"
widget "*PanelApplet*" style "gtk-theme-config-panel"
widget "*fast-user-switch*" style "gtk-theme-config-panel"
widget "*CPUFreq*Applet*" style "gtk-theme-config-panel"
widget "*indicator-applet*" style "gtk-theme-config-panel"
class "PanelApp*" style "gtk-theme-config-panel"
class "PanelToplevel*" style "gtk-theme-config-panel"
widget_class "*PanelToplevel*" style "gtk-theme-config-panel"
widget_class "*notif*" style "gtk-theme-config-panel"
widget_class "*Notif*" style "gtk-theme-config-panel"
widget_class "*Tray*" style "gtk-theme-config-panel" 
widget_class "*tray*" style "gtk-theme-config-panel"
widget_class "*computertemp*" style "gtk-theme-config-panel"
widget_class "*Applet*Tomboy*" style "gtk-theme-config-panel"
widget_class "*Applet*Netstatus*" style "gtk-theme-config-panel"
widget "*gdm-user-switch-menubar*" style "gtk-theme-config-panel"
widget "*Xfce*Panel*" style "gtk-theme-config-panel"
class "*Xfce*Panel*" style "gtk-theme-config-panel"

...#729fcf is a blue colour.

Note, this .gtkrc-2.0 file was generate by gtk-theme-config.

EDIT: Depending on your distro, gtk-theme-config may be in the distro's default repositories making it easy to install.

Last edited by ToZ (2014-03-19 00:22:15)

Offline

#3 2014-03-19 18:47:20

elias4444
Member
Registered: 2014-03-18
Posts: 3

Re: Override for Panel Font Colors

Thank you so much for your reply!

That definitely fixed a lot of the problem I was having! Apparently some themes are not quite compatible with it though (like Adwaita), as "mouse over" highlights don't seem to change their color (just the normal, non-mouse-over highlight state).

Time to go hunt down a compatible theme! Woohoo!

Offline

#4 2014-03-20 00:23:53

ozjd
Member
From: Hawkesbury NSW Australia
Registered: 2012-02-05
Posts: 219
Website

Re: Override for Panel Font Colors

elias4444 wrote:

Thank you so much for your reply!

That definitely fixed a lot of the problem I was having! Apparently some themes are not quite compatible with it though (like Adwaita), as "mouse over" highlights don't seem to change their color (just the normal, non-mouse-over highlight state).

Time to go hunt down a compatible theme! Woohoo!

If you look at the first section you see several lines with bg, that's the background colour or shading. The next few lines with fg are the foreground or text. They are all set the same as the background shading is used to differentiate the different states. You could edit them to be slightly different colours or experiment with different shading settings. As ToZ says this is easier with a gui like gtk-theme-config if you can get it for your distro.

Offline

#5 2014-03-20 22:52:07

elias4444
Member
Registered: 2014-03-18
Posts: 3

Re: Override for Panel Font Colors

I've been experimenting quite a bit now, mostly using gtk-theme-config (it was easy to install on Debian). There's still a few goofy parts here and there though. Is there a more "complete" tool to customize the gtk theme with?

Offline

#6 2014-03-20 23:47:38

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 1,271

Re: Override for Panel Font Colors

elias4444 wrote:

I've been experimenting quite a bit now, mostly using gtk-theme-config (it was easy to install on Debian). There's still a few goofy parts here and there though. Is there a more "complete" tool to customize the gtk theme with?

Not really. You can make manually customizations to the ~/.gtkrc-2.0 to override some settings, but the tough part is knowing which settings and how.

Why don't you post about the "goofy" parts and maybe someone has the knowledge to help out?

EDIT: Here is the xfce4-panel readme file that talks about some possible gtk customizations.

Last edited by ToZ (2014-03-20 23:54:15)

Offline

#7 2014-10-16 15:45:24

colinkeenan
Member
Registered: 2014-09-17
Posts: 11

Re: Override for Panel Font Colors

This may have nothing to do with any goofy results you are having, but just in case, since it took me over a year using Xfce to fully understand this, are you aware that there are actually 2 parts to a theme in Xfce? There's the Gtk part that you have been setting in the Appearance widget, and there's also the window title-bars and borders that get set in the Window Manager widget.

By the way, if you like one of the Window Manager themes for the title-bar/borders but want them to be dark instead of bright, I've found a way to make that change, although it's a little tedious. First make a new directory named `.themes` in your home directory. Then copy the directory for theme you want from `/usr/share/themes` into `.themes`. Rename that directory so you know it's the "dark" version. Using Thunar, go into the `xfwm4` subdirectory, and you'll see a bunch of pictures. You can edit each one with gimp and make them however you want. If you're like me, you're not going to be able to do much with them, but I figured out how to change the color and darkness in a very mechanical way that you can repeat on every picture. Just choose Colors->Hue-Saturation... If you want to change the color, move the hue slider until you find a number you like. If you just want to make it darker, move the Lightness slider to the left to turn that down. Once you know what numbers you like, you can edit every picture and just type those numbers in so every picture is changed in the same way. I personally didn't change the saturation. One more change I ended up making was to do Colors -> Maximum RGB... on the parts of the title bar that had color in them.

This is all very tedious, but you only have to do it once. If anyone reading this happens to know a way to apply the changes all at once from the command line or within Gimp, please comment.

You can see the results of my Window Manager theme tweaking here: https://github.com/colinkeenan/silentcast/#silentcast (This links to a README.md of a bash-script application I made for recording your desktop and making animated gifs or videos. The README.md starts off with recordings of my desktop showing how to use my application.)

Last edited by colinkeenan (2014-10-16 15:50:02)

Offline

Board footer

Powered by FluxBB