Subject: FVWM: foreground/background icon or border colors?

From: [email-masked] (Karl Berry)
Date: Wed, 26 Dec 2001 10:19:37 -0500

In standard fvwm2, is it possible to set the foreground/background icon
or border colors, independently of other colors?  All I can see to do is

  Style * Color white/grey

which sets both the fore/back icon colors and the window border colors,
as far as I can tell.  Although the active window border colors can be
controlled with HilightColor, I don't see a control for the inactive
window decorations.  Alternatively, I see no control for icon
fore/back colors, either.

I'm using fvwm 2.2.5 that came with red hat linux 7.2.  I looked at the
2.4.4 distribution; apparently the FvwmIconMan module supports this now,
but I confess I didn't try it, it uses up too much space.  I just want
to use the built-in IconBox feature.

I looked at the faq, google/groups, mailing list archives, etc., but
couldn't find any references to this.  Any hints appreciated.  Thanks
for the software!

Thanks,
[email-masked]
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 26 Dec 2001 17:14:35 +0000

> which sets both the fore/back icon colors and the window border colors,

Yes, icon title colors and window title colors can't be separated.
This is not changed in 2.4.x.

> fore/back colors, either.

Inactive border color (as well as background) is controlled by
Style * Color (that was obsoleted in 2.2.x in favor of Style * BackColor).

> to use the built-in IconBox feature.

The following can't be used in 2.2.x. If you decide to use 2.4.x,
delete any Color and HilightColor lines and use:

  Style * BackColor bg1, ForeColor fg1
  Style * HilightBack bg2, HilightFore fg2

Or use colorsets instead (see the man pages):

  Style * Colorset num1
  Style * HilightColorset num2

If you use colorsets, you may specify customized shadow/hilite background
colors for 3d effect. It is also possible to specify separate colors for
window borders (there is no such thing as icon borders):

  Style * BorderColorset num3
  Style * HilightBorderColorset num4

If you need to be able to specify icon title colors different from window
title colors (most people don't), feel free to submit a feature request.

Regards,
Mikhael.

---

From: Tenebrae <[email-masked]>
Date: Wed, 26 Dec 2001 23:21:00 -0800 (PST)

> > fore/back colors, either.

I have been wondering about this as well.

> Style * Color (that was obsoleted in 2.2.x in favor of Style * BackColor).

So I'm supposed to use Style * BackColor to set the inactive border colour
in 2.4.3?
What am I not supposed to use?  This doesn't seem to be doing a thing in
my config.

>   Style * HilightBack bg2, HilightFore fg2

This also didn't seem to do anything for me.

>   Style * HilightBorderColorset num4

This sounds cool if it would work for me.  I can't seem for the life of me
to get the grey border out of my inactive windows.
I have a nice dark purple border with a thin grey border around the
outside of my inactive windows. I'd rather that was another shade of
purple.
Also, the raised buttons etc. in my inactive windows have a grey 3d
shading.  I'd love to get rid of that and replace it with another shade of
purple.
I'm not getting the man pages or something.
Most .fvwm2rc files seem to use a pixmap for their window borders.  I
prefer a thin border with a bit of colour to it.
I got it to work in FVWM 2.2.4, but am having no luck in 2.4.3.
Still trying to stamp out all dull grey in my desktop...
								-Tenebrae.

---

From: Tenebrae <[email-masked]>
Date: Thu, 27 Dec 2001 06:54:16 -0800 (PST)

On Thu, 27 Dec 2001, Mikhael Goikhman wrote:

> On 26 Dec 2001 23:21:00 -0800, Tenebrae wrote:
> It is hard to understand what "a nice dark purple border with a thin grey
> border" mean without a config and/or screenshot.

You're right.  I should have included these to begin with.

Screenshot:
http://www.niceboots.com/~tenebrae/pics/tenebrae_fvwm2.4.3_screenshot.jpg

I added the red arrow and text to emphasize the parts I'm not
liking.  Er...please ignore the Gimp plugin errors in that window.  :/

My config file is still a bit messy, but I think these are the relevant
parts (in the order that they appear):

ImagePath /usr/share/icons/:/usr/share/icons/mini/:/usr/X11R6/include/X11/bitmaps/:/usr/share/pixmaps/

Style "*" Font -adobe-helvetica-bold-r-*-*-14-*-*-*-*-*-*-*
Style "*" IconFont fixed

# Testing 12/27/2001 - MDM
# I choose ludicrous colours for testing so they will stand out.
Style * BackColor PapayaWhip, ForeColor LightSkyBlue
Style * HilightFore #ffe22d, HilightBack #3C025E

AddToDecor Default
+ BorderStyle Inactive -- Sunk
+ BorderStyle Active -- Raised
+ TitleStyle Inactive TiledPixmap darkpurplebar.xpm
+ TitleStyle ActiveUp TiledPixmap purplebar.xpm
+ ButtonStyle 1 MiniIcon

Style "*" Title, Color Black/#22152B

> If you don't like the CDE-like shadow/hilite color calculations (I also
> don't like them) where the shadow color may be lighter than the background
> color, you should use colorsets and define "sh" and "hi" colors yourself.
> But shadow color of dark purple should not be pure gray like you say, it
> should be something like light purple, so probably your problem is other.

Probably something to do with the Title I set...

> You can't use colorset commands together with the old-style commands,
> i.e. HilightColorset overrides HilightBack and HilightFore.
> 
> Also, in my parent message I intentionally did not mention TitleStyle,
> it overrides BackColor and HilightBack (and Colorset and HilightColorset).

Hm.

> If I was screwed with configs, I would start with an empty .fvwm2rc (or
> with only bindings and menus) and add window look commands one by one
> (don't add a command if it does not do you anything good). This way the
> config is minimal and readable. For example start with this .fvwm2rc:
> 
>   Style * BackColor purple, ForeColor gray             # inactive windows
>   Style * HilightBack MediumPurple, HilightFore white  # active window
> 
>   Key F11 A CS Restart
>   Key F12 A CS Quit

That worked, so obviously I've made a mess of my config file and don't
quite understand what I'm doing.  I should start from scratch.  This is
what I get for trying to convert dot files between fvwm versions without
fully understanding all the commands.
Need more dot file examples...
Something is overriding the active/inactive window colours.

> If needed, download fvwm-themes and learn its configs, it uses colorsets.

I'm still putting that off.

Thanks.
								-Tenebrae.

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 27 Dec 2001 13:54:19 +0000

On 26 Dec 2001 23:21:00 -0800, Tenebrae wrote:
[skipped]

  Key F11 A CS Restart
  Key F12 A CS Quit

Or decide to use powerful colorsets and start with this .fvwm2rc:

  *FvwmTheme: Colorset 1 bg #a020d0, fg #c0c0c0, sh #9010c0, hi #b030e0
  *FvwmTheme: Colorset 2 bg #9070c0, fg #ffffff, sh #8060b0, hi #a080d0

  Style * Colorset 1                                   # inactive windows
  Style * HilightColorset 2                            # active window

  DestroyFunc StartFunction
  AddToFunc   StartFunction
  + I ModuleSynchronous FvwmTheme

Regards,
Mikhael.

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 27 Dec 2001 20:17:53 +0000

> http://www.niceboots.com/~tenebrae/pics/tenebrae_fvwm2.4.3_screenshot.jpg
...
> Style * HilightFore #ffe22d, HilightBack #3C025E
...
> Style "*" Title, Color Black/#22152B

Don't use Style Color, it was obsoleted years ago and may be removed.

> Probably something to do with the Title I set...

The problem is, as I said, in CDE-like shadow/hilite color calculations.
In 2.2.x, GTK-like calculations were used, so for the black background
shadow color was black (some people think this is good). In 2.4.x, the
shadow color for the black (or almost black) background is gray.

Currently you can't do anything except for using colorsets to replace gray
with whatever you want, like on the first line here (your colors used):

  *FvwmTheme: Colorset 1 bg #22152B, fg black, sh #110A15, hi #442a52
  *FvwmTheme: Colorset 2 bg #3C025E, fg #ffe22d

Regards,
Mikhael.

---

From: Tenebrae <[email-masked]>
Date: Thu, 27 Dec 2001 19:23:39 -0800 (PST)

> Don't use Style Color, it was obsoleted years ago and may be removed.

Ah, okay.  I guess I didn't understand earlier that this fell under that
category.
Thank you for pointing this out.
As it happens, removing this line entirely and incorporating it into the
Style backcolor/forecolor stuff worked better.

> shadow color for the black (or almost black) background is gray.

Ah HA!
Not entirely, it would seem.
(and I'm one of the people who thinks black shadow is good)

>   + I ModuleSynchronous FvwmTheme

Or...
I could just pick a colour that appears in rgb.txt instead of specifying a
hex colour myself.
Who would have thought it could be something so simple?
I don't have as wide a range of colours to choose from, alas, but I
managed to find a couple shades of purple that suited my purposes, for
now.
My .fvwm2rc file now has:

Style * BackColor purple4, ForeColor Black
Style * HilightFore #ffe22d, HilightBack BlueViolet

(well, and a bunch of other relatively unrelated stuff)

...and I have deleted the line: 

Observatory summary:
It would appear that part of my problem was that the default shadow colour
for any custom colour not appearing in rgb.txt is GREY.  Please correct me
if I'm wrong.
The other part of my problem was attempting to incorporate old code.

Thank you for helping me narrow this down.

Side note: the function key bindings you had me use in the test .fvwm2rc
didn't work - I have no F11 or F12 on my keyboard and simply changing the
entries to F9 and F10 didn't work.  :/  Luckily, FVWM2 appears to have
some sort of built-in menu that it will produce (even in the event of a
fairly empty dot file) which contains a restart and quit option.  Cool.
								-Tenebrae.

---

From: Dan Espen <[email-masked]>
Date: Thu, 27 Dec 2001 23:11:15 -0500

...
> for any custom colour not appearing in rgb.txt is GREY.  Please correct me

Nope, thats  not right.  It doesn't matter  if the color is in rgb.txt
or not.  No matter how you specify the color, it gets converted to RGB
(Red/Green/Blue)    values.  For  a shadow,    it  tries to subtract a
percentage from each  of the 3   RGB numbers, and  for highlighting it
tries to add.    It  gets  more complicated    than that.  To really
understand it, read libs/ColorUtils.c.

-- 
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Tenebrae <[email-masked]>
Date: Thu, 27 Dec 2001 22:49:21 -0800 (PST)

> understand it, read libs/ColorUtils.c.

My vision must be getting bad then, or I just picked the exact wrong
colours to use.  :/
Sure enough, I played around with different values that were and were not
in the rgb.txt file and they worked out fine.
I guess my prefered inactive window colour is just too close to black and
the shadow always ends up looking grey (unless I pick a brighter colour).
*sigh*
The ramblings of a madwoman on list again...
I guess when you get as old and tired as I am, everything starts to look
like shades of grey.  ;)
								-Tenebrae.