Menus are lists you can pop up from a binding or hook it to a start menu on a panel. 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.
MenuStyles are similar to /Config/Styles 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 some MenuStyles from the default config is
Refer to the manpage for a descriptoin of what each option does. If you want different menus to look and act differentially you can replace ‘*’ with the menu name your interested. For example you could use
…to have two separate looking menus, menus with names starting with FvwmMenu and names starting with MyMenu.
Now that we have set the MenuStyles, 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
The basic menu item format is
"[item name]%[icon]%" [command]
…the + just applies the item to the previous AddToMenu statement. It doesn’t matter if the icon comes before or after the name, for example ‘”%[icon]%[item name]” [commands]’ will have the same effect. If you use *..* instead of %..% the icon will appear above the menu item instead of to the right. The & symbol sets the hot key that can be used to trigger that items command. Additionally, you can use multiple icons and adjust where they appear in the menu with MenuStyle * ItemFormat.
This menu can then be opened by using the Menu command. For example you could bind this menu to open when you click on the root window as follows:
Each item’s command can be triggered by selecting it with a mouse click, moving around the menu with the arrow keys and using enter, or using the hot key defined by the & string in the above example.
Menu items can Popup new menus, run programs, custom functions. One can also create a menu of window operations. For example I have the following list of menu of window operations that opens when I right click the desktop or a window title bar.