<Home>
<Bugs>
<Configuration>
<Installation>
<Faq>
<Thanks>
Configuration examples
Wmconfig script
Twm configuration
Fvwm configuration
Gnome configuration
Pipe-Read configuration
Other configuration samples
Wmconfig installs a script "wmconfig_launcher" per default. This
script may be used to integrate the Wmconfig menu output in your Window
manager configuration.
This script reads the name of the Windowmanager as option and outputs the
required menu file in your Home directory. The default configuration files
for the supported Windowmanagers are included in Wmconfig.
If you want to use your own configuration, create a directory
"$HOME/.wmconfig/confs" and place your configuration there. Now
copy the default configuration files from "/usr/local/etc/wmconfig/confs"
to this directory and edit them.
When changing the files, please remember to use the same names like in
"/usr/local/etc/wmconfig/confs" like "twmrc" for Twm
or "aftersteprc" for AfterStep. Also remember to add or don't
delete the "# Wmconfig menu insert" line, because the script
requires this line to know where the menu will be inserted.
If the launcher script cannot find this line, it will not work.
Another option for the wmconfig_launcher script is the launcher option. When
using this option, a small Tk menubar will be created.
The default configuration files are taken from FreeBSD packages.
Here is a small sample "$HOME/.xinitrc" for Pekwm:
rm $HOME/.pekwm/menu
wmconfig_launcher pekwm
pekwm
The removal of $HOME/.pekwm/menu is required, because the script will not
override existing files.
Another sample for Twm:
rm $HOME/.twmrc
wmconfig_launcher twm
twm
If you want to edit your Windowmanager configuration, please remember to
edit "$HOME/.wmconfig/confs".
Edit the Twm configuration file "$HOME/.twmrc" and find the line
that opens the menu.
Sample:
menu "defops"
{
"Startmenu" f.title
"Mc" f.exec "xterm -t Mc -e mc &"
"Shell" f.exec "xterm &"
"" f.nop
"Show Iconmgr" f.showiconmgr
"Hide Iconmgr" f.hideiconmgr
"" f.nop
"Restart" f.restart
"Exit" f.quit
}
Now - add the following line:
"Wmconfig" f.menu "Wmconfig"
Rename the twmrc file into something like ".new_twmrc" and - instead
of running twm directly, use the following script:
cp $HOME/.new_twmrc $HOME/.twmrc
wmconfig --output twm >> $HOME/.twmrc
twm
When Twm starts, it uses the Wmconfig generated menus. If you use
this configuration, remember to edit the ".new_twmrc" file
if you want to change something.
Use this configuration style for Twm, Mwm and Ctwm.
Edit the configuration file "$HOME/.fvwmrc" and find the
line with the root menu. Now - split the file into two files, the
first file ends above the root menu and the second file begins with
the root menu definition. Rename the files into ".fvwmrc_1"
and ".fvwmrc_2".
Sample:
Function "Resize-Or-Raise"
Resize "Motion"
Raise "Motion"
Raise "Click"
RaiseLower "DoubleClick"
EndFunction
This means you should split here
Popup "Startmenu"
Title "Startmenu"
Exec "Shell" exec xterm &
Nop ""
Popup "Modules" Module-Popup
Nop ""
Popup "Exit Fvwm" Quit-Verify
EndPopup
Now - use this script for running Fvwm:
cp $HOME/.fvwmrc_1 $HOME/.fvwmrc
wmconfig --output fvwm >> $HOME/.fvwmrc
cat $HOME/.fvwmrc_2 >> $HOME/.fvwmrc
fvwm
This works for Fvwm, Mlvwm, Haze and Pekwm.
The Gnome output relies on 2 seperate output formats. The first one writes
the desktop application launchers, by default to
"$HOME/.local/share/applications", which can be changed using the
outputdir option.
The second output generates the required XML based menu file that builds the
menu by reading the desktop entries. This XML file is written to:
$HOME/.config/menus/applications-merged/wmconfig.menu
To let Gnome recognize this file, please edit or create, if it doesn't exist,
the file:
$HOME/.config/menus/applications.menu
If the file doesn't exist, the following content will display the Wmconfig
menu:
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" "http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
<Menu>
<Name>Wmconfig</Name>
<MergeFile type="parent">wmconfig.menu</MergeFile>
</Menu>
If the file already exists adding all lines, except the first one, at the
beginning or the end of the applications.menu file will let Gnome recognize
the Wmconfig menu file too.
This has only to be done once of course since Gnome will detect any changes
to the Wmconfig menu.
Other window managers like WindowMaker, Pekwm or Golem support external
submenus using special Pipe-Read commands. A command like a Shellscript or
Wmconfig then generates the menus.
For WindowMaker add a line like:
(Applications, OPEN_MENU, "|| wmconfig --output wmaker"),
to the menu configuration file ("WMRootMenu")
OpenBox also support such a configuration. Just add in your
"menu.xml" file the following lines:
<menu id="wmconfig" label="Wmconfig" execute="wmconfig --output openbox">
</menu>
And then in the Root Menu definition called "root-menu" the lines:
<menu id="wmconfig" />
PekWm also supports Pipe Menus. Just add the following line:
COMMAND = "wmconfig --output pekwm"
in your menu file.
Golem also uses a similar function and this line should read
the menus:
.exec "/usr/X11R6/bin/wmconfig --output golem"
For Fvwm2 and Fvwm95 add the lines the following lines:
AddToMenu "Wmconfig" "Wmconfig" Title
+ DynamicPopupAction Function Wmconfig_Menu
AddToFunc Wmconfig_Menu
+ I DestroyMenu recreate Wmconfig
+ I AddToMenu Wmconfig "Wmconfig" Title
+ I PipeRead 'wmconfig --output fvwm2'
to the configuration file and paste the line:
+ "Wmconfig" Popup Wmconfig
into the root menu definition.
The given examples may be easily used for other window managers like Qvwm or Ol(v)wm. Refer the manuals on how to include external menus into the configuration or feel free to write me an Email.