<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.
Gnome 2.10 Output is not supported because the problems of the Gnome Panel
reading other menus. With Gnome Version 2.12 this changed and support was
added.
Run "wmconfig --output gnome2" to create the desktop entries and
the xml file will be later read by Gnome.
The desktop files will be written, per default, to
"$HOME/.local/share/applications" (this can be changed using the
outputdir option). Already existing files will be overwritten. Creating a
special submenu only for the Wmconfig entries seems not possible, because
Gnome ignores it.
In "$HOME/.config/menus" the xml file (wmconfig.menu) will be
created. To let Gnome read this file, change
"$HOME/.config/menus/applications.menu"
<?xml version="1.0"?>
<Menu>
<Name>Applications</Name>
<MergeFile type="parent"/>
<MergeFile>wmconfig.menu</MergeFile>
</Menu>
The Gnome Panel should now read the menu. If you used the "rootmenu"
change the name "wmconfig.menu" to the name of your root 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.