program icon on titlebar?

I have a program that should have an icon. Is there a way to show the program’s icon on the far left of the titlebar? I have the titlebar colors, gradients, and buttons working ok. I’d just like to show a program’s icon on the left, like a microsoft window does.

thanks,
William

You’ll want

[code]AddButtonStyle 1 MiniIcon

Mouse 1 1 N SomeFuncOrMenuOrSomething
[/code]
Where ‘Add’ -prefix should preserve the gradient underneath, otherwise iirc it is destructive.

And you need something to be actually bound to happen when clicking on it, otherwise it won’t show (Mouse … -line).

Well, he asked for it in the titlebar (which I am assuming not to be a button). Again, that’s also possible, in one’s decor:

TitleStyle leftmain Minicon
......

– Thomas Adam

Yes, I’m just looking for an icon at the left of the title bar, not a button. I tried this and don’t see any difference.

TitleStyle ActiveUp (HGradient 128 2 rgb:0/0/400 40 rgb:0/0/600 60 gray) Inactive (HGradient 128 gray35 gray)
TitleStyle ActiveDown (VGradient 16 black rgb:47/79/79)-- Flat
TitleStyle leftmain Minicon

The first two Titlestyle lines work. I’m running firefox rigth now in fvwm. I’m not sure if there should be an icon for this program. There is one in the windows version.

thanks,
William

I think this is supposed to be TitleStyle LeftMain MiniIcon You are using small letters. Try that and see if it works

No, there is no difference with the capital letters and corrected spelling.
I’d just be happy with a default icon there for now.

William

I exited fvwm and noticed on the console that “LeftMain” is undefined. But I don’t know what to replace it with.

William

I changed the order to

TitleStyle MiniIcon LeftMain

Now I get no error messages on the console and I see the firefox icon! But it is in the middle of the titlebar text. How can you get it moved to the left?

William

I thought that the LeftMain was supposed to be part of MultiPixmap option. However, if you can see it, you could try ‘LeftEnd’ in place of LeftMain.

I tried that. Now I get:

[FVWM][ReadDecorFace]: <> unknown style LeftEnd: LeftEnd MiniIcon

No, the titlebar is divided into sections:

+-------------------------------------------------------------------------------------------------+
|     LM  |                                Main                                      |     RM   |
+-------------------------------------------------------------------------------------------------+

(The above is oversimplified). Main refers to the entire titlebar. RM (Right of Main) is just after the text of the titlebar, to the right. LM (Left of main) is just to the left of the text in the titlebar. There’s other options as well, that you can look up.

– Thomas Adam

Nah. :slight_smile: Case doesn’t matter. But the order of the commands, does. I got them backwards [1]. Should be:

TitleStyle MiniIcon LeftMain

– Thomas Adam

[1] Yes, I do make mistakes. :slight_smile:

I now have

TitleStyle MiniIcon LeftMain

The titlebar text is centered and the icon is in the center of the text. Pretty ugly.

William

Not my day today… Try adding the following to your decor definition:

+ TitleStyle MiniIcon -- Left

– Thomas Adam

That did it. Thanks!