How do I customize window colours?

Hi,

I’ve just started using fvwm. I’m using the default config with a couple of modifications. All is well but I would like to change the window colours. At the moment they are a sort of pink when activated and grey when inactive. I really can’t work out how to change it. What lines do I need to append in the .fvwm2rc file?

Regards,

James

If you’re not using FVWM 2.5.31, please do so now, as I am going to tell you to use Colorsets to do this, which aren’t available on FVWM 2.4.X

It works like this, James. A colorset is a definition of what a colour should be – i.e., it has a foreground and a background, which when applied together form a nice colour. You can take this definition and use it in multiple places if you like. Here’s an example from my own config:

Colorset 0 fg black, bg burlywood
Colorset 1 fg black, bg #B56D3A

So you can see I have two colorsets defined there, with “0” and “1”. Note that the numbering is important. The numbers can mean whatever you like – fvwm-themes has a guideline about the numbers and the assigned meanings, but really it’s up to you how you want to organise your colorsets. The rule to note here though is that you MUST keep the numbers low, due to how FVWM implement colorsets, they can take up more memory than they ought to.

Having defined the above, we now need to apply them to something. In your case, you’re wanting to change the colour of a window – which has two states. When it has focus, and when it doesn’t. So here’s an example of that:

# All windows use Colorset 0 when not active (i.e. does not have focus).
Style *   Colorset 0

# All windows use Colorset 1 when active (i.e. has focus).
Style *   HilightColorset 1

… and that’s it. Note that as I have the “fg” defined in both as black – any titles on the window are rendered in that colour. Change to suit.

– Thomas Adam

Thanks a lot!

I’m not using 2.5 at the moment it’s 2.4 but I’ll upgrade it.

Also I notice your in england. Yay us!