Icons in menus?

I have this menu in fvwmr2c


AddToMenu MyApps	"MyApps Menu"	Title
+	"Emacs"			Exec exec emacs
+	"xfig"			   Exec exec xfig
+	"openOffice"	       Exec exec ooffice
+	"Kwrite"	          Exec exec kwrite

is there some way that I can get icons of the programs on either the right or left side??

[color=red]Edited by theBlackDragon:
–> Moved from Basic questions[/color]

MenuStyle * ItemFormat "%.4s%.1|%.5l%.5l%.5r%.5i%2.3>%1|"

Then you can do stuff like:

AddToMenu foo
+  %xcalc.xpm%Calculator Exec exec xcalc

– Thomas Adam

I now have:

MenuStyle * ItemFormat "%.4s%.1|%.5l%.5l%.5r%.5i%2.3>%1|" 
AddToMenu MyApps				"MyApps Menu"	Title
+	%emacs.png% Emacs			Exec exec emacs
+	"xfig"						Exec exec xfig

but that gives me nothing.[/code]

Have you specified your image path?

The image is in:

/home/mos/.fvwm/icons/emacs.png

But I cannot find anything about imagepath in fvwm2rc.

I now have:

ImagePath $HOME/.fvwm/icons:

I now get the Icon but I don’t get the title of the app.

Is there some place to find good icons for menu apps?

Here’s a menu entry from my menu if you want to use it as a working example:

+   "Web Browser"%icons/firefox16.png%              Exec exec firefox

I’m usually able to find nice icons here:

gnome-look.org/index.php?xcontentmode=120

What does all this stuff

do?

I’ve always just put the image name between two %s next to the menu item and it’s worked. Should I have the above line in there somewhere as well?

It defines how certain parts of the menu are displayed. By and large, the
default ItemFormat that FVWM provides is good enough for most (it seems):

MenuStyle * ItemFormat "%.4s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|"

It looks cryptic, but it just describes how the menu items are to be layed
out. In the above example:

“%.4s” – places a side picture (plus four pixels gap)
“%.1|” – begins the hilighted area of the menu (the select part of it).
“%.5i” – inserts the first miniicon (plus five pixels gap)
“%.5l” – first column left aligned
“%.5l” – second column left aligned.
“%.5r” – third column right aligned.
“%.5i” – second miniicon (plus five pixels)
“%2.3>” – two pixel gap, plus sub-menu triangle, plus three pixels.
“%1|” – one pixel, plus end of hilighted area.

I suppose what makes it harder is the fact that you can position these things
with pixel offsets. What the ItemFormat I defined does, is simply placed the
miniicon to the right. Everything else is the same as per the FVWM default
ItemFormat.

– Thomas Adam

Ah, interesting. I always wondered about icon placements in menus…

Cheers!

how can i substitute the triangle with a .png?
thanks in advance!

You can’t.

– Thomas Adam

even delete it? not display or something else? :cry:

I think you’d need to change the source-code for that.

how to change the font of fwwm-menu-desktop and make it different from menu font??? i can’t do it!!!

To do what?

– Thomas Adam

because the menu font has a body of 12… but when wallpaper browser pops up it is too big because of the name of files… so i need to make the body of the font about 8

Try this:

Menustyle <name of menu> Font "xft:blah:size=8"

Substitute blah with the name of a font (you must have it installed, however.)

the problem is what is the name of the menu… i’m speaking about the wallpaper browser, that is not a classic fvwmmenu

Can you tell me which menu you’re on about? Is it a scripted menu using MissingSubMenuFunction? Or what?

– Thomas Adam