Customizing Menus
Among the window manager features and functions defined in the configuration file are the contents of menus. The system.fvwm2rc file generally defines a number of menus intended to be useful to a large percentage of people. But the menus you have and what they offer are basically up to you.
Typically the Root menu is defined as follows:
AddToMenu RootMenu "Root Menu" Title + "XTerm" Exec exec xterm + "Rxvt" Exec exec rxvt + "" Nop + "Remote Logins" Popup Remote-Logins + "" Nop + "Utilities" Popup Utilities + "" Nop + "Fvwm Modules" Popup Module-Popup + "Fvwm Window Ops" Popup Window-Ops + "Fvwm Simple Config Ops" Popup Misc-Ops + "" Nop + "Refresh Screen" Refresh + "Recapture Screen" Recapture + "" Nop + "Exit Fvwm" Popup Quit-Verify
You use the AddToMenu variable to create a menu. The first parameter that AddToMenu takes is the name of the menu, in this case RootMenu. The menu name is used to reference the menu elsewhere in the configuration file (e.g., to specify a key binding to pop up the menu). Note that the AddToMenu variable and the menu name are automatically repeated on each line of the menu definition, as indicated by the plus sign.
Each line of the definition creates a line on the menu as seen by the user; types of lines include the menu title, a menu item proper, a blank line, and a separator. The third component of each line specifies the text that appears on that line. The fourth component specifies the window manager function to be performed.
The first ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access