Menus are lists you can pop up from a binding or hook it to a start menu on a TaskBar. Menus can be used to list programs or even be created dynamically so you can list the contents of a directory, a recent applications menu, etc. The first thing to set up with the menu is the colorsets that the menu will use. Most menus will use two colorsets, one for the main menu and one for the active item. A simple start for two colorsets could be;

# Menu Colorsets
Colorset 7 fg Black, bg #e6e7d7, sh Black, hi #202070
Colorset 8 fg DarkRed, bg #e6e7d7, sh Black, hi #202070

With fvwm 2.5.10 you can make RootTransparent colorsets for menus. These colorsets will use the background as the pixmap for the menu so they appear to be transparent but will not show any windows located under the menu. Example of such colorsets are:

Colorset 7 RootTransparent, fg Black, bg average, sh Black, \
  hi #202070, Tint White 60, bgTint White 60

This is a RootTransparent colorset, where Tint and bgTint are the colors to tint the menu with followed by the percentage of tint, 0 would mean no tint and all transparent while 100 would be a solid color.

With the Translucency patch you can make the windows behave closer to true transparency. If you have installed that patch correctly, you can create a translucent colorset. To use the option you add 'Translucent [color] [percent]' to the colorset, like the following example:

Colorset 7 fg Black, Translucent White 75, \
  hi Black, sh Black

After the colorsets are setup, then its time to define some MenuStyles to tell FVWM how the menus behave. MenuStyles are similar to Style commands and can be used with wild cards '*' to set up the style so all your menus look the same or can be used to make different menus use different MenuStyles. An example of a collection of global MenuStyles is:

# MenuStyles
MenuStyle * PopupDelayed, PopupDelay 300, PopdownImmediately
MenuStyle * PopupOffset -5 100, TitleWarpOff
MenuStyle * TitleUnderlines2, SeparatorsLong, TrianglesSolid
MenuStyle * AnimationOff, AutomaticHotkeysOff
MenuStyle * BorderWidth 2
MenuStyle * PopupAsSubmenu, HoldSubmenus, SubmenusRight
MenuStyle * ItemFormat "%|%5.5i%1.3l%2.3>%|"
MenuStyle * VerticalItemSpacing 1 1, VerticalTitleSpacing 2 2
MenuStyle * MenuColorset 7
MenuStyle * ActiveFore, Hilight3DOff
MenuStyle * ActiveColorset 8
MenuStyle * Font "Shadow=2:xft:Sans:Bold:size=11:antialias=True"

Refer to the man page for what each option does, but they are mostly self explanatory and are used to control how the PopUp and PopDown of menus behave, the colorsets used, the font and the formating of the menu items and titles. If you want different menus to look and act differentially you can replace '*' with the menu name your interested. For example you could use 'MenuStyle FvwmMenu* [styles]' and 'MenuStyle MyMenu* [styles]' to have two separate looking menus, menus with names starting with FvwmMenu and names starting with MyMenu.

Now that we have set up how the menus look and act, its time to build some menus. Building menus is quite similar to building functions, you first should destroy the previous menu and then add items to the menu in the order you want them to appear. A basic root menu could look like this

# FvwmRootMenu
DestroyMenu FvwmRootMenu
AddToMenu   FvwmRootMenu "Root Menu" Title
+ "Programs%menu/programs.png%"  Popup FvwmProgramsMenu
+ "Console%menu/terminal.png%"  FvwmATerm
+ "FVWM Console%menu/terminal.png%"  Module FvwmConsole
+ "" Nop
+ "Help%menu/help.png%"  Popup FvwmManPagesMenu
+ "Restart FVWM%menu/restart.png%"  Restart
+ "Quit FVWM%menu/quit.png%"  Quit

The basic menu item format is '+ "[item name]%[icon]%" [action]'. It doesn't matter if the icon comes before or after the name, for example '+ "%[icon]%[item name]" [action]' will have the same effect. To control if the icons are on the left or right side of the menu item, you'll want to mess with the MenuStyles. This creates a simple 'Root Menu' which is opened when you click on the root window (check out the bindings page). This menu has 5 items in it, the first opens a sub-menu called 'FvwmProgramsMenu'. The second runs the function FvwmATerm when clicked which then launches an aterm. The third item will open the FvwmConsole module. This is a terminal that will allow you to type in FVWM syntax commands to be applied imeditally. the '+ "" Nop' will create a separator. The laste few itmes will open another menu called 'FvwmManPagesMenu', restart and quit fvwm.

Now we called two sub-menus, so lets add them to our config, one will be a small list of programs that you can expand on and the other will be a nice menu that includes all the man pages for fvwm.

# Programs Menu
DestroyMenu FvwmProgramsMenu
AddToMenu   FvwmProgramsMenu "Programs" Title
+ "GVim%menu/vim.png%"  FvwmGVim
+ "Gimp%menu/gimp.png%"  FvwmGimp
+ "FireFox%menu/firefox.png%"  FvwmFireFox
+ "Irssi%menu/irc.png%"  FvwmIrssi
+ "Xmms%menu/xmms.png%"  FvwmXmms
+ "XRoach-Invasion%menu/xroach.png%"  XRoachInvasion
+ "XRoach-Exterminate%menu/xroach.png%"  XRoachExterminate

# FVWM Help Menu
DestroyMenu FvwmManPagesMenu
AddToMenu   FvwmManPagesMenu "FVWM Man Pages" Title
+ "%menu/help.png%fvwm"                FvwmViewManPage fvwm
+ "%menu/help.png%FvwmAnimate"         FvwmViewManPage FvwmAnimate
+ "%menu/help.png%FvwmAuto"            FvwmViewManPage FvwmAuto
+ "%menu/help.png%FvwmBacker"          FvwmViewManPage FvwmBacker
+ "%menu/help.png%FvwmBanner"          FvwmViewManPage FvwmBanner
+ "%menu/help.png%FvwmButtons"         FvwmViewManPage FvwmButtons
+ "%menu/help.png%FvwmCommand"         FvwmViewManPage FvwmCommand
+ "%menu/help.png%FvwmConsole"         FvwmViewManPage FvwmConsole
+ "%menu/"     FvwmViewManPage
+ "%menu/help.png%FvwmCpp"             FvwmViewManPage FvwmCpp
+ "%menu/help.png%FvwmDebug"           FvwmViewManPage FvwmDebug
+ "%menu/help.png%FvwmDragWell"        FvwmViewManPage FvwmDragWell
+ "%menu/help.png%FvwmEvent"           FvwmViewManPage FvwmEvent
+ "%menu/help.png%FvwmForm"            FvwmViewManPage FvwmForm
+ "%menu/help.png%FvwmGtk"             FvwmViewManPage FvwmGtk
+ "%menu/help.png%FvwmGtkDebug"        FvwmViewManPage FvwmGtkDebug
+ "%menu/help.png%FvwmIconBox"         FvwmViewManPage FvwmIconBox
+ "%menu/help.png%FvwmIconMan"         FvwmViewManPage FvwmIconMan
+ "%menu/help.png%FvwmIdent"           FvwmViewManPage FvwmIdent
+ "%menu/help.png%FvwmM4"              FvwmViewManPage FvwmM4
+ "%menu/help.png%FvwmPager"           FvwmViewManPage FvwmPager
+ "%menu/help.png%FvwmPerl"            FvwmViewManPage FvwmPerl
+ "%menu/help.png%FvwmProxy"           FvwmViewManPage FvwmProxy
+ "%menu/help.png%FvwmRearrange"       FvwmViewManPage FvwmRearrange
+ "%menu/help.png%FvwmSave"            FvwmViewManPage FvwmSave
+ "%menu/help.png%FvwmSaveDesk"        FvwmViewManPage FvwmSaveDesk
+ "%menu/help.png%FvwmScript"          FvwmViewManPage FvwmScript
+ "%menu/help.png%FvwmScroll"          FvwmViewManPage FvwmScroll
+ "%menu/help.png%FvwmTaskBar"         FvwmViewManPage FvwmTaskBar
+ "%menu/help.png%FvwmTheme"           FvwmViewManPage FvwmTheme
+ "%menu/help.png%FvwmWharf"           FvwmViewManPage FvwmWharf
+ "%menu/help.png%FvwmWinList"         FvwmViewManPage FvwmWinList
+ "%menu/help.png%FvwmWindowMenu"      FvwmViewManPage FvwmWindowMenu
+ "" Nop
+ "%menu/help.png%fvwm-config"         FvwmViewManPage fvwm-config
+ "%menu/help.png%fvwm-perllib"        FvwmViewManPage fvwm-perllib
+ "%menu/help.png%fvwm-root"           FvwmViewManPage fvwm-root
+ "%menu/help.png%fvwm-bug"            FvwmViewManPage fvwm-bug
+ "%menu/help.png%fvwm-convert-2.2"    FvwmViewManPage fvwm-convert-2.2
+ "%menu/help.png%fvwm-convert-2.4"    FvwmViewManPage fvwm-convert-2.4
+ "" Nop
+ "%menu/help.png%fvwm-menu-desktop"   FvwmViewManPage fvwm-menu-desktop
+ "%menu/help.png%fvwm-menu-directory" FvwmViewManPage fvwm-menu-directory
+ "%menu/help.png%fvwm-menu-headlines" FvwmViewManPage fvwm-menu-headlines
+ "%menu/help.png%fvwm-menu-xlock"     FvwmViewManPage fvwm-menu-xlock

The next menu is a list of window operations so you can perform various actions on windows and take screenshots. In the bindings page I set up a binding that will open this window when you left click on the root window. The last item calls the module FvwmIdent which will pop up a window telling you the various characteristics of that window, such as name, class, resource and other useful stuff.

# fvwm Window Operation Menu
DestroyMenu FvwmWindowOpsMenu
AddToMenu   FvwmWindowOpsMenu "Window Operations" Title
+ "Move%menu/window-move.xpm%"  Move
+ "Resize%menu/window-resize.xpm%"  Resize
+ "(De)Iconify%menu/window-iconify.xpm%"  Iconify
+ "(Un)Maximize%menu/window-maximize.xpm%"  Maximize
+ "(Un)Shade%menu/window-shade.xpm%"  WindowShade
+ "(Un)Stick%menu/window-stick.xpm%"  Stick
+ "" Nop
+ "Close%menu/window-close.xpm%"  Close
+ "Delete%menu/window-delete.xpm%"  Delete
+ "Destroy%menu/window-destroy.xpm%"  Destroy
+ "" Nop
+ "StaysOnTop%menu/window-raise.xpm%"  Pick (CirculateHit) Layer 0 6
+ "Layer +1%menu/window-raise.xpm%"  Pick (CirculateHit) Layer +1
+ "StaysPut%menu/window.xpm%"  Pick (CirculateHit) Layer 0 4
+ "Layer -1%menu/window-lower.xpm%"  Pick (CirculateHit) Layer -1
+ "StaysOnBottom%menu/window-lower.xpm%"  Pick (CirculateHit) Layer 0 2
+ "" Nop
+ "%menu/window.xpm%Window Screenshot"  Pick (CirculateHit) FvwmWindowScreenshot
+ "%menu/display.xpm%Screenshot" FvwmDesktopScreenshot 5
+ "" Nop
+ "Identify%menu/window-identify.xpm%"  Module FvwmIdent

Window Decor index Modules