summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBill Allombert <ballombe@debian.org>2011-11-16 12:33:27 +0100
committerIgor Pashev <pashev.igor@gmail.com>2013-03-05 16:39:28 +0000
commitdd7279795c97aa356727d366a2149c9bc838b496 (patch)
treea87d19d2e5220f5b38aec3b5b036235a59f971c9 /examples
downloadmenu-dd7279795c97aa356727d366a2149c9bc838b496.tar.gz
Imported Debian version 2.1.46debian/2.1.46
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/9wm32
-rw-r--r--examples/README33
-rwxr-xr-xexamples/afterstep48
-rwxr-xr-xexamples/afterstep-joost35
-rwxr-xr-xexamples/cat28
-rwxr-xr-xexamples/ctwm32
-rwxr-xr-xexamples/dwww46
-rw-r--r--examples/example_executable_menufile43
-rwxr-xr-xexamples/fvwm37
-rwxr-xr-xexamples/fvwm258
-rwxr-xr-xexamples/fvwm9548
-rwxr-xr-xexamples/gnome-panel48
-rw-r--r--examples/menu.config3
-rw-r--r--examples/menu.h91
-rwxr-xr-xexamples/pdmenu68
-rw-r--r--examples/system.9wmrc-menu33
-rw-r--r--examples/system.ctwmrc-menu199
-rw-r--r--examples/system.fvwm2rc381
-rw-r--r--examples/system.fvwm2rc95520
-rw-r--r--examples/system.fvwmrc-menu513
-rw-r--r--examples/system.steprc-menu301
-rw-r--r--examples/system.twmrc-menu104
-rw-r--r--examples/translate_menus99
-rwxr-xr-xexamples/twm34
24 files changed, 2834 insertions, 0 deletions
diff --git a/examples/9wm b/examples/9wm
new file mode 100755
index 0000000..1d1bc0a
--- /dev/null
+++ b/examples/9wm
@@ -0,0 +1,32 @@
+#!/usr/bin/install-menu
+# -*- mode: shell-script; -*-
+#I need menu-1!
+#
+#NOTE: the first line of this script _must_ be
+# equal to "#!/usr/bin/install-menu", otherwise update-menus
+# will feed this script old-compat-mode data.
+#
+#More info: /usr/share/doc/menu/html.
+#
+compat="menu-1"
+
+!include menu.h
+function f($com)=" echo '\"" title() ":" esc($com,"\"") "\"'\n"
+supported
+ wm= f(":9wm exit;" $command)
+ x11= f($command)
+ text=f(term())
+# wm =" echo '\"" $title ":9wm exit;" esc($command,"\"") "\"'\n"
+# x11 =" echo '\"" $title ":" esc($command,"\"") "\"'\n"
+# text=" echo '\"" $title ":xterm -title '\\'"\
+# $title "\\'' -e " esc($command,"\"") "\"'\n"
+endsupported
+startmenu= "function " $section "() {\n"
+endmenu= "}\n"
+# echo "\"MainMenu:$config --menu MainMenu\""
+submenutitle=" echo \"\\\"" title() ":$config --menu " $section "\\\"\"\n"
+genmenu= "menudefs.hook"
+rcfile= "system.9wmrc"
+examplercfile="system.9wmrc-menu"
+rootprefix= "/etc/X11/9wm/"
+userprefix= "/.9wm/"
diff --git a/examples/README b/examples/README
new file mode 100644
index 0000000..ed2dd08
--- /dev/null
+++ b/examples/README
@@ -0,0 +1,33 @@
+This directory contains some examples of /etc/menu-methods scripts.
+
+These are just that: examples. The files here are included to show
+you how to write menu-methods, or to copy them to the
+window-manager you're maintaining (please check them if you do!)
+if you're not interested in all that, but just want to have menus
+you're probably better of using any of the window-managers that
+work together with menu already (olvwm, fvwm2, afterstep, wm2, pdmenu...)
+
+The menu-methods in this directory, all use the "!include" feature, which
+means, that by changing the definitions in /etc/menu-methods/menu.h, you can
+change the look of all menus in all window managers (that use these new
+features).
+
+For more info on the menu-methods themselves, read /usr/share/doc/menu/html.
+
+Some of the menu-methods in this directory use the "rcfile" stuff
+(grep "examplercfile" $f; to see). If they do, then you'll also need to
+copy the corresponding system.$wm-menu file to the right directory
+(see "examplercfile" def, along with rootdir).
+
+***************************
+The 9wm window manager:
+ If you want to get Debian menus, you should type
+
+ /etc/X11/9wm/system.9wmrc --start /Debian
+
+ and the menus will appear in the 9wm menu (mouse 3).
+
+ Also, if you, for example, select Apps/Games/Puzzles/xtriangles,
+ then, apart from MainMenu, you'll also have an entry for
+ Apps, Games and Puzzles in your 9wm menu. I don't know
+ how to fix this (or if it should be "fixed").
diff --git a/examples/afterstep b/examples/afterstep
new file mode 100755
index 0000000..662dbb6
--- /dev/null
+++ b/examples/afterstep
@@ -0,0 +1,48 @@
+#!/usr/bin/install-menu
+# -*- mode: shell-script; -*-
+#I need menu-1!
+#
+#NOTE: the first line of this script _must_ be
+# equal to "#!/usr/bin/install-menu", otherwise update-menus
+# will feed this script old-compat-mode data.
+#
+#More info: /usr/share/doc/menu/html.
+#
+compat="menu-1"
+!include menu.h
+
+compat="menu-2"
+
+function mod($var,$com)=" " $var " \""
+ title() ifnempty($hotkey,"&" toupper($hotkey))
+ "\" exec " $com "\n";
+
+function ex($com)=mod("Exec",$com);
+
+
+supported;
+ asmodule= mod("Module", $command);
+ fvwmmodule= mod("Exec", $command);
+ wm= mod("Restart",$command);
+ x11fvwm= ex($command);
+ x11= ex($command);
+ text= ex(term());
+endsupported;
+
+startmenu= "PopUp \"" $section "\"\n Title \"" title() "\"\n";
+
+endmenu= ifempty(title(),
+ " Popup \"Exit\" Quit-Verify\n" )
+ "EndPopUp\n";
+#very clever endmenu! (hadn't thought of doing it like that myself).
+
+submenutitle=" Popup \"" title() cond_surr(icon(),"%","%") "\""
+ $section "\n";
+
+genmenu= "menudefs.hook";
+
+rootprefix="/etc/X11/afterstep/";
+userprefix=".afterstep/";
+mainmenutitle="Debian Menu";
+
+
diff --git a/examples/afterstep-joost b/examples/afterstep-joost
new file mode 100755
index 0000000..ef1d074
--- /dev/null
+++ b/examples/afterstep-joost
@@ -0,0 +1,35 @@
+#!/usr/bin/install-menu
+#I need menu-1!
+#
+#NOTE: the first line of this script _must_ be
+# equal to "#!/usr/bin/install-menu", otherwise update-menus
+# will feed this script old-compat-mode data.
+#
+#More info: /usr/share/doc/menu/html.
+#
+compat="menu-1"
+
+!include menu.h
+
+compat="menu-2"
+
+function ex($com)=" Exec \"" $title "\" exec " $com "\n";
+function mod($var,$com) =" " $var " \"" $title "\" exec " $com "\n";
+
+supported;
+ fvwmmodule= mod("Exec", $command);
+ wm= mod("Restart",$command);
+ x11fvwm= ex($command);
+ x11= ex($command);
+ text= ex(term());
+endsupported;
+
+startmenu= "PopUp \"" $section "\"\n";
+endmenu= "EndPopUp\n";
+submenutitle=" Popup \"" title() cond_surr(icon(),"%","%") "\""
+ $section "\n";
+genmenu: "menudefs.hook";
+rootprefix: "/etc/X11/afterstep/";
+userprefix: "/.afterstep/";
+input2prefix: "/etc/X11/afterstep/";
+mainmenutitle: "DebianMenu";
diff --git a/examples/cat b/examples/cat
new file mode 100755
index 0000000..cf179a6
--- /dev/null
+++ b/examples/cat
@@ -0,0 +1,28 @@
+#!/bin/sh
+cat > /tmp/menu-stdin
+
+exit 0
+
+#In the good old days of menu-0 compatibility, one had to use:
+
+# #!/usr/bin/install-menu
+# #I need menu-1!
+#
+# #
+# #This file can be very usefull when you want to run one particular
+# #menu-method file several times, without running any of the others.
+# #In order to do so, do:
+# # - cp ./cat /etc/menu-methods/
+# # - run update-menus so that the "cat" menu-method gets executed.
+# # Now you've got /tmp/menu-stdin.
+# # - With this file, you don't need update-menus at all any more, and you
+# # can symply run your hand-written "menu-test" menu-method by typing:
+# # ./menu-test < /tmp/menu-stdin
+# #
+# # The advantage of doing this is
+# # - none of the other menu-method files get excecuted (speedup)
+# # - update-menus doesn't need to open some hundred menu-entry files
+# # every time you test a change in your menu-method file.
+# # (speedup)
+# compat="menu-1"
+# command="cat > /tmp/menu-stdin"
diff --git a/examples/ctwm b/examples/ctwm
new file mode 100755
index 0000000..eea8bcc
--- /dev/null
+++ b/examples/ctwm
@@ -0,0 +1,32 @@
+#!/usr/bin/install-menu
+# -*- mode: shell-script; -*-
+#I need menu-1.4!
+#
+#NOTE: the first line of this script _must_ be
+# equal to "#!/usr/bin/install-menu", otherwise update-menus
+# will feed this script old-compat-mode data.
+#
+#More info: /usr/share/doc/menu/html.
+#
+compat="menu-1"
+
+!include menu.h
+
+compat="menu-2"
+
+function f($com)=" \"" title() "\" f.exec \""$com " &\"\n";
+
+#This doens't seem to be possible with twm: wm="f.restart \"${title}\"\\n"
+supported;
+ x11= f($command);
+ text=f(esc(term(),"\""));
+endsupported;
+
+startmenu= "menu \"" $section "\"\n{\n";
+endmenu= "}\n";
+submenutitle=" \"" title() "\" f.menu \"" $section "\"\n";
+genmenu= "menudefs.hook";
+rcfile= "system.ctwmrc";
+examplercfile="system.ctwmrc-menu";
+rootprefix= "/etc/X11/ctwm/";
+userprefix= "/.ctwm/";
diff --git a/examples/dwww b/examples/dwww
new file mode 100755
index 0000000..788ae5b
--- /dev/null
+++ b/examples/dwww
@@ -0,0 +1,46 @@
+#!/usr/bin/install-menu
+#I need menu-1!
+#
+#NOTE: the first line of this script _must_ be
+# equal to "#!/usr/bin/install-menu", otherwise update-menus
+# will feed this script old-compat-mode data.
+#
+#More info: /usr/share/doc/menu/html.
+#
+#The output of this script still isn't quite right, but it starts
+#to be acceptable.
+#
+compat="menu-1"
+
+!include menu.h
+
+compat="menu-2"
+
+supported;
+ dwww = "<li><a href=\"/cgi-bin/dwww?type="
+ ifelse($dwwwtype,$dwwwtype,"file")
+ "&location="
+ $command "\">"
+ ifelse($longtitle,$longtitle,$title) "</a>"
+ ifnempty($description,"<br><font size=-1>"$description "</font>")
+ "\n";
+endsupported;
+startmenu= "<P><font size=+2><b><a name=\"" $section "\">"
+ $title
+ "</a></b></font><p><ul type=disc>"
+ ifnempty($description,"<br><font size=-1>" $description "</font>")
+ "\n";
+endmenu= "</ul>\n\n";
+submenutitle="<li><font size=2><a href=\"#" $section "\">"
+ ifelse($longtitle,$longtitle,$title) "</font></a>"
+ ifnempty($description,"<br><font size=-1>"$description "</font>")
+ "\n";
+genmenu= "/var/lib/dwww/html/menudefs.hook";
+#the rc copy stuff doesn't work yet, sorry.
+rcfile= "/var/lib/dwww/html/menu.html";
+examplercfile="/usr/lib/dwww/menu.html-menu";
+rootprefix= "/";
+userprefix= ".dwww/";
+treewalk="(mc)";
+mainmenutitle="Debian information";
+preoutput="<! automatically generated file. Do not edit (see /usr/share/doc/menu/html)>\n\n";
diff --git a/examples/example_executable_menufile b/examples/example_executable_menufile
new file mode 100644
index 0000000..58e4d00
--- /dev/null
+++ b/examples/example_executable_menufile
@@ -0,0 +1,43 @@
+#!/usr/bin/perl
+
+# This example was contributed by Marc Haber <zugschlus@debian.org>
+# This script can be put into ~/.menu to create a menu of hosts to ssh to.
+
+# Build icons hash to determine which icon file to use for a given menu
+# entry. This basically allows a shorthand notation for the icon, avoiding
+# the need to give the full path to the icon in the data list.
+my %icons;
+$icons{"Debian"}="/usr/share/pixmaps/other/Debian-Swirl.png";
+$icons{"FreeBSD"}="/usr/share/pixmaps/other/Daemon.png";
+$icons{"Redhat"}="/usr/share/pixmaps/other/RedHat.png";
+
+# Loop over the data lines given at the end of this file.
+while( <DATA> ) {
+ # Split data line into data fields
+ my ($host, $hints, $icon) = split;
+ # print menu line using the information read from the data field.
+ print "?package(local.ssh):command=\"ssh $host\" ";
+ print "title=\"$host\" hints=\"$hints\" section=\"local/ssh\" ";
+ print "needs=\"text\" icon=\"$icons{$icon}\"\n";
+}
+
+# This is the list of hosts. Each line corresponds to a single host
+# and menu entry in the format "host hint icon". The host is taken
+# as the target to ssh to and the window title. The hint is given verbatim
+# to the hint option, and the icon is an index into the icons hash to
+# determine which icon file to use for the menu entry.
+__DATA__
+torres Zg2 Debian
+q Zg2 Debian
+7o9 Zg2 Debian
+lefler Zg2 Debian
+darren Zg2 Debian
+vash Zg2 Debian
+gonzo Shell Redhat
+raven Shell FreeBSD
+crystalball Shell Debian
+iris Burda Debian
+ella Burda Debian
+francis Burda Debian
+bianca Burda Debian
+banshee Burda Debian
diff --git a/examples/fvwm b/examples/fvwm
new file mode 100755
index 0000000..fdb341a
--- /dev/null
+++ b/examples/fvwm
@@ -0,0 +1,37 @@
+#!/usr/bin/install-menu
+# -*- mode: shell-script; -*-
+#I need menu-1.4!
+#
+#NOTE: the first line of this script _must_ be
+# equal to "#!/usr/bin/install-menu", otherwise update-menus
+# will feed this script old-compat-mode data.
+#
+#More info: /usr/share/doc/menu/html.
+#
+compat="menu-1"
+
+!include menu.h
+
+compat="menu-2"
+
+function ex($com)=" Exec \"" title() "\" exec " $com "\n";
+function mod($var,$com) =" " $var " \"" title() "\" exec " $com "\n";
+
+supported;
+ fvwmmodule= mod("Exec", $command);
+ wm= mod("Restart",$command);
+ x11fvwm= ex($command);
+ x11= ex($command);
+ text= ex(term());
+endsupported;
+
+startmenu= "PopUp \"" $section "\"\n";
+endmenu= "EndPopUp\n";
+submenutitle=" Popup \"" title() cond_surr(icon(),"%","%") "\""
+ $section "\n";
+genmenu= "menudefs.hook";
+rcfile= "system.fvwmrc";
+examplercfile="system.fvwmrc-menu";
+rootprefix="/etc/X11/fvwm/";
+userprefix=".fvwm/";
+mainmenutitle="DebianMenu";
diff --git a/examples/fvwm2 b/examples/fvwm2
new file mode 100755
index 0000000..7b46766
--- /dev/null
+++ b/examples/fvwm2
@@ -0,0 +1,58 @@
+#!/usr/bin/install-menu
+#
+#More info: /usr/share/doc/menu/
+#
+
+compat="menu-1"
+
+!include menu.h
+
+compat="menu-2"
+
+function sup($com)="+ \"" escfirst(title(), $hotkey, "&")
+ cond_surr(icon(), "%", "%") "\" " $com "\n";
+
+supported;
+ fvwm2module= sup( $command);
+ fvwmmodule= sup("Exec " $command);
+ wm= sup("Restart " $command);
+ x11fvwm2= sup("Exec " $command);
+ x11= sup("Exec " $command);
+ text= sup(term() );
+endsupported;
+
+# Ok, "startmenu" is a little wacky, and comes in 4 parts:
+# 1. If this is running for a user, then we do a DestroyMenu to
+# clear out the system one. Furthermore, if we're dealing with the
+# top-level /Debian menu, then add a title for it (normally done in
+# system.fvwm2rc), and re-read the main-menu-pre.hooks whose results
+# we merrily blew away earlier. This is so that the
+# main-menu-pre.hooks work for users as well as system-wide. Of
+# course, none of this happens if we're running as root to produce the
+# system-wide menudef.hook file.
+# 2. We spit out an "AddToMenu /Foo/Bar/Baz" to start this menu.
+# 3. We add the title to the menu if this isn't the /Debian menu
+# (since that title comes from the system.fvwm2rc).
+# 4. We add a trailing newline to the lot.
+startmenu= ifroot("",
+ "DestroyMenu \"" $section "\"\n"
+ ifeq($section, "/Debian",
+ "AddToMenu \"/Debian\" \"Main Menu\" Title\n"
+ "Read /etc/X11/fvwm2/main-menu-pre.hook\n"
+ "Read .fvwm2/main-menu-pre.hook\n"))
+ "AddToMenu \"" $section "\" "
+ ifnempty($title, " \"" $title "\" Title")
+ "\n";
+
+endmenu= "\n";
+submenutitle= "+ \"" escfirst($title,$hotkey,"&")
+ cond_surr($icon,"%","%") "\" PopUp " $section "\n";
+genmenu= "menudefs.hook";
+rootprefix="/etc/X11/fvwm2/";
+userprefix="/.fvwm2/";
+treewalk="c(m)";
+
+# This is just as an example of what is possible. It causes all
+# running fvwm2's to restart. Uncomment the following line if you
+# want this to happen.
+#postrun="killall -USR1 /usr/X11R6/bin/fvwm2";
diff --git a/examples/fvwm95 b/examples/fvwm95
new file mode 100755
index 0000000..57c68fd
--- /dev/null
+++ b/examples/fvwm95
@@ -0,0 +1,48 @@
+#!/usr/bin/install-menu
+#I need menu-1!
+#
+#I seem not to have fvwm95 installed, so I havent actually tested this.
+#
+#
+#NOTE: the first line of this script _must_ be
+# equal to "#!/usr/bin/install-menu", otherwise update-menus
+# will feed this script old-compat-mode data.
+#
+#More info: /usr/share/doc/menu/html.
+#
+compat="menu-1"
+
+!include menu.h
+
+compat="menu-2"
+
+function sup($com)="+ \"" escfirst(title(), $hotkey, "&")
+ cond_surr(icon(), "%", "%") "\" " $com "\n";
+
+
+supported;
+ fvwm2module= sup( $command);
+ fvwmmodule= sup("Exec " $command);
+ wm= sup("Restart " $command);
+ x11fvwm2= sup("Exec " $command);
+ x11= sup("Exec " $command);
+ text= sup(term() );
+endsupported;
+
+startmenu= "DestroyMenu \"" $section "\"\nAddToMenu \""
+ $section "\" \"" $title "\" Title\n";
+
+endmenu= "\n";
+submenutitle= "+ \"" escfirst($title,$hotkey,"&")
+ cond_surr($icon,"%","%") "\" PopUp " $section "\n";
+genmenu= "menudefs.hook";
+rootprefix="/etc/X11/fvwm95/";
+userprefix="/.fvwm95";
+treewalk="c(m)";
+mainmenutitle="Main Menu";
+
+#this is just as an example of what is possible, I don't think
+#this should go into the default fvwm95:
+# postrun="killall -USR1 /usr/X11R6/bin/fvwm95";
+
+
diff --git a/examples/gnome-panel b/examples/gnome-panel
new file mode 100755
index 0000000..68efbd2
--- /dev/null
+++ b/examples/gnome-panel
@@ -0,0 +1,48 @@
+#!/usr/bin/install-menu
+compat="menu-1"
+
+!include menu.h
+
+compat="menu-2"
+
+function findicon($filename)=
+ ifelsefile($filename, $filename,
+ iffile("/usr/X11R6/include/X11/pixmaps/" $filename,
+ "/usr/X11R6/include/X11/pixmaps/" $filename));
+
+function AppEntry($var)=
+ "[Desktop Entry]\n"
+ "Name=" title() "\n"
+ "Comment=" ifelse($longtitle,$longtitle,$title) "\n"
+ "Exec=" $command "\n"
+ $var
+ ifnempty($icon,"Icon=" findicon($icon) "\n")
+ "Type=Application\n" ;
+
+function SubmenuEntry()=
+ "[Desktop Entry]\n"
+ "Name=" $title "\n"
+ "Icon=gnome-folder.png\n"
+ "Type=Directory\n";
+
+supported;
+ x11= AppEntry("Terminal=false\n");
+ text= AppEntry("Terminal=true\n");
+endsupported;
+
+genmenu=parent($section) "/" $title ifeqelse($needs, "", "/.directory", ".desktop") "";
+startmenu="";
+endmenu="";
+
+rootsection="";
+
+rootprefix="/var/lib/gnome/Debian/";
+userprefix=".gnome/Debian";
+
+treewalk="M";
+#submenutitle="SUBMENUTITLE section=[" $section "] title=[" $title "]";
+submenutitle=SubmenuEntry();
+
+prerun="rm -rf " prefix() "/*";
+
+preoutput="";
diff --git a/examples/menu.config b/examples/menu.config
new file mode 100644
index 0000000..693331e
--- /dev/null
+++ b/examples/menu.config
@@ -0,0 +1,3 @@
+verbosity=quiet
+method=stderr
+
diff --git a/examples/menu.h b/examples/menu.h
new file mode 100644
index 0000000..48c2007
--- /dev/null
+++ b/examples/menu.h
@@ -0,0 +1,91 @@
+# -*- mode: shell-script; -*-
+#The definitions here are used by all window managers that !include menu.h.
+#This way, you can set your preferences (like whether to use xterm/rxvt,
+#how long do you want your menu titles, etc) for all window-managers.
+#
+#This file is part of the menu package (version 1.4 and higher).
+#For more information, see /usr/share/doc/menu/html
+
+#If you prefer long titles, change the definition below accordingly.
+
+function title()=$title
+
+#function title()=ifelse($longtitle,$longtitle,$title)
+
+#If you don't like to see the icons, (un)comment (out) the lines below:
+function icon()=ifelse($icon32x32, $icon32x32, \
+ ifelse($icon16x16, $icon16x16, $icon))
+#function icon()= ""
+
+#Define the X terminal emulator to use for text apps under X11.
+#The following use the x-terminal-emulator alternative.
+
+function term()=\
+ "x-terminal-emulator " ifnempty($visible,"-ut") \
+ ifnempty($geometry,"-geometry ") $geometry \
+ " -T \"" esc(title(),"\\\"") "\"" \
+ " -e sh -c \"" esc($command,"\\\"") "\""
+
+#The above is more correct but unfortunately, some menu-methods
+#do not support ''.
+
+#function term()=\
+# "x-terminal-emulator " ifnempty($visible,"-ut") \
+# ifnempty($geometry,"-geometry ") $geometry \
+# " -T '" escwith(title(),"'","'\\'") \
+# "' -e sh -c '" escwith($command,"'","'\\'") "'"
+
+#Examples:
+#Use a specially cooked xterm instead:
+#function term()=\
+# "xterm -sb -sl 500 -j -ls -fn 7x14 -geometry 80x30"\
+# " -T '" escwith(title(),"'","'\\'") \
+# "' -e sh -c '" escwith($command,"'","'\\'") "'"
+
+#Force use of rxvt:
+#function term()=\
+# "rxvt " ifnempty($visible,"-ut") \
+# ifnempty($geometry,"-geometry ") $geometry \
+# " -T '" escwith(title(),"'","'\\'") \
+# "' -e sh -c '" escwith($command,"'","'\\'") "'"
+
+
+
+# This sort menu entry case-insensitively.
+sort=$sort ":" tolower(title())
+
+#If you want your submenus to come before the commands themselves
+#in the menus (in case of mixed menus):
+#
+#sort=$sort ":" ifelse($command, "1", "0" ) ":" title()
+
+#Activate menu section translations:
+outputlanguage="LOCALE"
+#menu-methods need to set 'outputencoding' before translations are really
+#enabled.
+
+
+#The following is for the hints (or optimised tree structure):
+# (For more info on these variables, see /usr/share/doc/menu/*)
+
+#If you want menu to optimize the tree, set this to true:
+hint_optimize=false
+#for more info on the other variables, see /usr/share/doc/menu/
+#hint_nentry=6
+#hint_topnentry=4
+#hint_mixedpenalty=15
+#
+#The variables below are only useful if you want to speedup
+#the finding of the best tree.
+#hint_minhintfreq=0.1
+#hint_mlpenalty=2000
+#hint_max_ntry=4
+#hint_max_iter_hint=5
+#hint_debug=false
+
+
+forcetree
+#Due to the existance of both /Apps/System and /System,
+#menu gets confused. So, force /System in it's own section
+ System
+endforcetree
diff --git a/examples/pdmenu b/examples/pdmenu
new file mode 100755
index 0000000..9ce82fb
--- /dev/null
+++ b/examples/pdmenu
@@ -0,0 +1,68 @@
+#!/usr/bin/install-menu
+# -*- mode: shell-script; -*-
+#
+# Written by Joey Hess.
+#
+# This generates a pdmenurc file that can be preprocessed by cpp to enable
+# different types of displays. For example, you can -Dx11 -Xtext to display
+# only the text and x11 entries, and not the vc ones.
+#
+# More info: /usr/share/doc/menu/html, /usr/doc/pdmenu/README.Debian
+
+# The verson of the menu package that can process this.
+compat="menu-1"
+
+#include the local preferences, pdmenu only uses the defintion of title().
+!include menu.h
+
+compat="menu-2"
+
+# Filename of the pdmenurc file we will generate.
+genmenu="pdmenurc_auto";
+
+# Where the system wide generated file is placed.
+rootprefix="/var/lib/pdmenu/";
+
+# Title of the top level menu that is made.
+mainmenutitle="Debian Menus";
+
+# Don't ever use "q" as a hotkey in menus, becuase it is used to popdown
+# submenus.
+hotkeyexclude="q";
+
+# Some text to go at the top of the autogenerated file.
+preoutput="# Automatically generated pdmenurc file.\n# Do not edit (see /usr/doc/pdmenu/README.debian)\n\n";
+
+# In what order we output the menus.
+treewalk="c(m)";
+
+# How to start a new menu in the rc file.
+startmenu="menu:" esc($section,":") ":" esc(title(),":") "\n";
+
+# How to add a submenu to a menu.
+# Notice that thanks to cpp and some #defines, the submenu is only added if
+# the submenu actually contains menu entries.
+submenutitle=
+ "#ifdef " cppesc($section) "\n"
+ "#define " cppesc(parent($section)) "\n"
+ " show:" esc(escfirst(title(),$hotkey,"_"),":") "..::" esc($section,":") "\n"
+ "#endif\n";
+
+# The supported display types, in order of preference.
+supported;
+x11= "#ifdef x11\n"
+ "#define " cppesc(parent($section)) "\n"
+ " exec:" esc(escfirst(title(),$hotkey,"_"),":") ":n:" $command " >/dev/null 2>&1 &\n"
+ "#endif\n";
+vc= "#ifdef vc\n"
+ "#define " cppesc(parent($section)) "\n"
+ " exec:" esc(escfirst(title(),$hotkey,"_"),":") "::" $command "\n"
+ "#endif\n";
+text= "#ifdef text\n"
+ "#define " cppesc(parent($section)) "\n"
+ " exec:" esc(escfirst(title(),$hotkey,"_"),":") "::" $command "\n"
+ "#endif\n";
+endsupported;
+
+# Pdmenu doesn't need anything special at the end of a menu.
+endmenu= "\n";
diff --git a/examples/system.9wmrc-menu b/examples/system.9wmrc-menu
new file mode 100644
index 0000000..dffe7a7
--- /dev/null
+++ b/examples/system.9wmrc-menu
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+#I need to be executable!!
+#
+#(all the other system.*wm*.rc files don't need to be executable,
+#but the 9wm one does.
+#(the system.9wmrc-menu file doesn't need to be executable, though)
+
+config=/etc/X11/9wm/system.9wmrc
+
+#
+#the next line inludes the /etc/X11/9wm/menudefs.hook file (or
+#the personalised version from the user.
+#
+include-menu-defs
+
+while test "$#" != "1" ; do
+ case "$1" in
+ --menu)
+ (echo /usr/bin/X11/9menu -teleport -label $2 -popdown \
+ `$2` exit)|/bin/sh;
+ shift;;
+ --start)
+ (echo /usr/bin/X11/9menu -iconic -teleport -label $2 -popdown \
+ `$2` exit)|/bin/sh;
+ shift;;
+
+ *)
+ echo Usage: $config --menu menu-name
+ exit;;
+ esac
+done
+
diff --git a/examples/system.ctwmrc-menu b/examples/system.ctwmrc-menu
new file mode 100644
index 0000000..1e0e86f
--- /dev/null
+++ b/examples/system.ctwmrc-menu
@@ -0,0 +1,199 @@
+#
+# $XConsortium: system.twmrc,v 1.8 91/04/23 21:10:58 gildea Exp $
+#
+# Default twm configuration file; needs to be kept small to conserve string
+# space in systems whose compilers don't handle medium-sized strings.
+#
+# Sites should tailor this file, providing any extra title buttons, menus, etc.
+# that may be appropriate for their environment. For example, if most of the
+# users were accustomed to uwm, the defaults could be set up not to decorate
+# any windows and to use meta-keys.
+#
+
+NoGrabServer
+RestartPreviousState
+DecorateTransients
+TitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
+ResizeFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
+MenuFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
+IconFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
+IconManagerFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*"
+ShowWorkSpaceManager # start with workspcace manager up
+UseThreeDMenus
+UseThreeDTitles
+UseThreeDIconManagers
+UseThreeDBorders
+UseThreeDWMap
+SunkFocusWindowTitle
+
+workspacemanagergeometry "360x60+60-0" 4
+WorkSpaces {
+ "One" {"#686B9F" "white" "DeepSkyBlue3"}
+ "Two" {"#619AAE" "white" "firebrick" "white" "xpm:background8.xpm"}
+ "Three" {"#727786" "white" "brown"}
+ "Four" {"#8C5b7A" "white" "MidnightBlue"}
+
+ "Five" {"#727786" "white" "firebrick"}
+ "Six" {"#619AAE" "white" "firebrick" "white" "xpm:ball%.xpm"}
+ "Seven" {"#8C5b7A" "white" "chartreuse4"}
+ "Eight" {"#686B9F" "white" "MidnightBlue"}
+}
+
+Color
+{
+ BorderColor "blue"
+ DefaultBackground "green"
+ DefaultForeground "gray85"
+ BorderTileBackground "DeepSkyBlue1" {
+ "xterm" "DeepSkyBlue3"
+ }
+ BorderTileForeground "Black" {
+ "xterm" "DeepSkyBlue3"
+ }
+ TitleBackground "yellow" {
+ "xterm" "DeepSkyBlue3"
+ }
+ TitleForeground "blue" {
+ "xterm" "White"
+ }
+ MenuBackground "yellow"
+ MenuForeground "blue"
+ MenuTitleBackground "red"
+ MenuTitleForeground "yellow"
+ IconBackground "LightSlateBlue"
+ IconForeground "White"
+ IconBorderColor "gray85"
+ IconManagerBackground "DeepSkyBlue3" {"Axe" "DeepSkyBlue3" "xload" "DeepSkyBlue2"}
+ IconManagerForeground "blue"
+ MapWindowBackground "DeepSkyBlue1" {
+ "root*" "Red"
+ "xterm" "DeepSkyBlue3"
+ "Axe" "Yellow"
+ }
+ MapWindowForeground "Black" {
+ "xterm" "White"
+ }
+}
+
+IconManagerDontShow {
+ "WorkSpaceManager"
+ "xload"
+ "xclock"
+ "xdaliclock"
+ "xlogo"
+ "xpinguin"
+ "xteddy"
+}
+
+NoTitle { # little programs that look like icons
+ "TWM Icon Manager"
+ "WorkSpaceManager"
+ "xload"
+ "xclock"
+ "xdaliclock"
+ "xlogo"
+ "xpinguin"
+ "xteddy"
+}
+
+AutoRaise { # These window will raise automagically
+ "XTerm"
+ "Emacs"
+ "Netscape"
+ "Mosaic"
+ "Chimera"
+}
+
+#
+# Define some useful functions for motion-based actions.
+#
+MoveDelta 3
+Function "move-or-lower" { f.move f.deltastop f.lower }
+Function "move-or-raise" { f.move f.deltastop f.raise }
+Function "move-or-iconify" { f.move f.deltastop f.iconify }
+
+#
+# Set some useful bindings. Sort of uwm-ish, sort of simple-button-ish
+#
+Button1 = : root : f.menu "/Debian"
+Button2 = : root : f.menu "windowops"
+
+Button1 = m : window|icon : f.function "move-or-lower"
+Button2 = m : window|icon : f.iconify
+Button3 = m : window|icon : f.function "move-or-raise"
+
+Button1 = : title : f.function "move-or-raise"
+Button2 = : title : f.raiselower
+
+Button1 = : icon : f.function "move-or-iconify"
+Button2 = : icon : f.iconify
+
+Button1 = : iconmgr : f.iconify
+Button2 = : iconmgr : f.iconify
+
+Button1 = : frame : f.resize
+Button1 = m : frame : f.move
+Button2 = : frame : f.raiselower
+#
+# And a menus with the usual things
+#
+
+
+#This line includes the /etc/X11/ctwm/menudefs.hook file, as I don't
+#know how else to make twm include files.
+
+include-menu-defs
+
+
+menu "windowops" {
+ "Windows" f.title
+ "Occupy" f.occupy
+ "Occupy All" f.occupyall
+ "Iconify" f.iconify
+ "Refresh" f.refresh
+ "Vanish" f.vanish
+ "Info" f.identify
+ "" f.separator
+ "Resize" f.resize
+ "Move" f.move
+ "Adopt Window" f.adoptwindow
+ "Animate" f.startanimation
+ "Don't animate" f.stopanimation
+ "" f.separator
+ "Send Delete" f.delete
+ "Kill Window" f.destroy
+ "Pin menu" f.pin
+ "" f.separator
+ "Restart" f.restart
+ "Exit" f.quit
+}
+
+menu "windowmenu" {
+ "Occupy ..." f.occupy
+ "Occupy All" f.occupyall
+ "Iconify" f.iconify
+ "RaiseLower" f.raiselower
+ "Refresh" f.winrefresh
+ "Zoom" f.menu "Zoom"
+ "Vanish" f.vanish
+ "Focus" f.focus
+ "Unfocus" f.unfocus
+ "" f.separator
+ "Send Delete" f.delete
+ "Kill Window" f.destroy
+ "Resize..." f.resize
+ "Move..." f.move
+}
+
+menu "iconmenu" {
+ "Actions" f.title
+ "" f.separator
+ "Restore" f.iconify
+ "Move" f.move
+ "Occupy ..." f.occupy
+ "Occupy All" f.occupyall
+ "" f.separator
+ "Send Delete" f.delete
+ "Kill Window" f.destroy
+}
+
diff --git a/examples/system.fvwm2rc b/examples/system.fvwm2rc
new file mode 100644
index 0000000..ce60e78
--- /dev/null
+++ b/examples/system.fvwm2rc
@@ -0,0 +1,381 @@
+#
+# Configuration file for fvwm2
+# by Lars Wirzenius
+# "@(#):$Id: system.fvwm2rc,v 1.1 2003-04-07 17:04:19 ballombe Exp $"
+#
+# This file can be used both as the system.fvwmrc and the per-user ~/.fvwm2rc.
+# It uses certain `hooks' (files stored in /etc/X11/fvwm2 or ~/.fvwm2) to allow
+# the system administrator and user to modify menus, colors, and so on without
+# having to change this file.
+#
+# The defaults that this file sets up follow my own taste. They attempt to set
+# up a nice, easy, comfortable environment for the "ordinary" user. However,
+# using the hooks, it should be possible to change anything.
+#
+# Please read /usr/doc/fvwm2/README.sysrc for more information.
+#
+# Hopefully, you will never have to modify this file.
+#
+
+#
+# Section: pre.hook
+#
+# Use pre.hook for things that need to be done before anything else.
+# For example, a PixmapPath might be defined here.
+#
+Style "Fvwm Pager" StaysOnTop
+Style "FvwmPager" StaysOnTop
+Style "Fvwm*" NoTitle, NoHandles, Sticky, WindowListSkip,
+Style "Fvwm*" BorderWidth 0,CirculateSkipIcon
+Style "*" SmartPlacement
+Style "*" RandomPlacement
+Style "Xlock" NoTitle
+Style "xlock" NoTitle
+Module FvwmPager 0 3
+*FvwmButtons(4x1) - whatever Swallow "FvwmPager" Module FvwmPager 0 3
+*FvwmPagerBack #908090
+*FvwmPagerFore #484048
+*FvwmPagerFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
+*FvwmPagerHilight #cab3ca
+*FvwmPagerGeometry -1-1
+#*FvwmPagerLabel 0 Misc
+#*FvwmPagerLabel 1 Maker
+#*FvwmPagerLabel 2 Mail
+#*FvwmPagerLabel 3 Matlab
+*FvwmPagerSmallFont 5x8
+
+
+Read /etc/X11/fvwm2/pre.hook
+Read .fvwm2/pre.hook
+
+
+#
+# Section: Various global settings
+#
+# These settings are personal. If you need to modify them, do so in post.hook.
+#
+#
+# DeskTopSize sets the size of the desktop in units of physical screen
+# `pages'. I prefer to use separate desktops instead of pages, but
+# many reasonable people do it the other way. My reason is that this
+# makes it possible to have different backgrounds when changing the
+# workspace.
+#
+
+DeskTopSize 3x3
+
+#
+# I don't like to be able to move between pages or desks simply by
+# moving the mouse against the screen border. I find it very
+# confusing. The following command disables it.
+#
+
+EdgeScroll 0 0
+
+#
+# When moving a window against the edge of the screen, it is
+# nice to have a small resistance before the window is moved outside
+# the screen. This makes it easier to line windows against the
+# edges.
+#
+
+EdgeResistance 0 100
+
+
+#
+# Section: Styles, colors, fonts, and related things
+#
+# This section defines the looks, behavior, and other attributes of windows.
+# These are also quite personal. Modify them in post.hook.
+#
+#
+# The following sets window colors. This is highly personal,
+# of course.
+#
+
+Style "*" Color black/darkgrey
+HilightColor white steelblue
+WindowFont -adobe-helvetica-bold-r-*-*-12-*
+
+#
+# The following sets the window decorations: the window title, borders,
+# and the handles in the corners.
+#
+
+ButtonStyle 2 16 20x20@1 30x20@1 50x40@1 70x20@1 80x20@1 80x30@0 60x50@0 80x80@0 70x80@0 50x60@0 30x80@0 20x80@0 20x70@0 40x50@1 20x30@0 20x20@1
+ButtonStyle 4 5 25x25@1 25x75@1 75x75@0 75x25@0 25x25@1
+ButtonStyle 6 2 80x76@0 20x76@1
+
+Style "*" BorderWidth 6
+Style "*" HandleWidth 6
+Style "*" MWMBorder
+Style "*" MWMDecor
+Style "*" DecorateTransient
+Style "*" SmartPlacement
+Style "*" RandomPlacement
+Style "*" IconBox 0 0 50 -1
+
+Style "Fvwm*" NoTitle
+Style "Fvwm*" WindowListSkip
+Style "Fvwm*" CirculateSkip
+
+Style "FvwmButtons" Sticky
+Style "FvwmIconMan" Sticky
+
+Style "FvwmIdent" Title
+Style "FvwmIdent" WindowListHit
+Style "FvwmIdent" CirculateHit
+
+
+#
+# Section: Init and restart functions
+#
+# This section defines the functions InitFunction and RestartFunction.
+# InitFunction is executed automatically when fvwm first starts.
+# RestartFunction is executed automatically when fvwm restarts itself.
+# They share a common hook, init-restart.hook, and two specific hooks,
+# init.hook and restart.hook.
+#
+# init-restart.hook should be used for starting fvwm modules, such as the
+# button bar. init-hook should be used to start other applications; they
+# should not be started again, when fvwm is restarted, since they don't
+# die like fvwm modules do. restart.hook exists mostly for completeness;
+# tell me if you find any use for it.
+#
+# InitFunction runs the script setup-background, which looks in
+# ~/.fvwm2 to see if the user wants some specific background color or
+# image.
+#
+
+DestroyMenu InitFunction
+AddToFunc InitFunction
++ "I" Exec setup-background
+Read /etc/X11/fvwm2/init.hook
+Read /etc/X11/fvwm2/init-restart.hook
+Read .fvwm2/init.hook
+Read .fvwm2/init-restart.hook
+
+DestroyMenu RestartFunction
+AddToFunc RestartFunction
+Read /etc/X11/fvwm2/restart.hook
+Read /etc/X11/fvwm2/init-restart.hook
+Read .fvwm2/restart.hook
+Read .fvwm2/init-restart.hook
+
+
+#
+# Section: Menus
+#
+# This section defines a small menu structure. The main menu contains
+# some typical entries, and uses a hook (main-menu.hook) to allow the
+# user to add new entries. Most of the default entries are submenus,
+# which are also defined here.
+#
+
+#
+# MWM style menus are easier to use and better for Windows refugees.
+#
+
+MenuStyle black grey white -adobe-helvetica-bold-r-*-*-12-* mwm
+
+#
+# The main menu.
+#
+
+###DestroyMenu MainMenu
+###AddToMenu MainMenu
+###+ "Main menu" Title
+###Read /etc/X11/fvwm2/main-menu-pre.hook
+###Read .fvwm2/main-menu-pre.hook
+###Read /etc/X11/fvwm2/main-menu.hook
+###Read .fvwm2/main-menu.hook
+###+ "" Nop
+###+ "Exit Fvwm" Popup Quit-Verify
+###
+####
+# Read in system and user menu definitions.
+#
+
+Read /etc/X11/fvwm2/menudefs.hook
+Read .fvwm2/menudefs.hook
+
+#
+# The Window-Ops menu is for manipulating windows. It is invoked either
+# from the main menu, or directly from the root window.
+#
+
+DestroyMenu Window-Ops
+AddToMenu Window-Ops
++ "Window Ops" Title
++ "Move" Move
++ "Resize" Resize
++ "Raise" Raise
++ "Lower" Lower
++ "(De)Iconify" Iconify
++ "(Un)Stick" Stick
++ "(Un)Maximize vertical" Maximize 0 100
++ "(Un)Maximize horizontal" Maximize 100 0
++ "(Un)Maximize to screen" Maximize 100 100
++ "" Nop
++ "Destroy" Destroy
++ "Close" Close
+
+#
+# Quit-Verify checks that the user really wants to exit.
+#
+
+DestroyMenu Quit-Verify
+AddToMenu Quit-Verify
++ "Restart Fvwm" Restart fvwm2
++ "" Nop
++ "Really quit" Quit
+
+
+#
+# Section: Mouse bindings
+#
+# This section defines the mouse bindings, that is, all the things that
+# can be done with the mouse.
+#
+
+#
+# Each button gives a different menu from the background.
+#
+
+Mouse 1 R A Menu /Debian
+Mouse 2 R A Menu Window-Ops
+Mouse 3 R A WindowList
+
+#
+# Moving and resizing, depending on which part of the window
+# you grab (T=title bar, S=side/top/bottom, F=corner).
+#
+
+Mouse 1 T A move-or-raise
+Mouse 2 T A move-and-raise-or-raiselower
+Mouse 3 T A move-or-lower
+Mouse 0 F A resize-or-raiselower
+Mouse 1 S A move-or-raise
+Mouse 2 S A move-and-raise-or-raiselower
+Mouse 3 S A move-or-lower
+
+
+#
+# Move or de-iconify an icon.
+#
+
+Mouse 0 I A move-or-winmenu-or-deiconify
+
+#
+# Buttons on the title bar (1,3,5,7,9 are on the left, 0,8,6,4,2 on
+# the right side of the title bar). Note that the bindings here
+# make more sense if the ButtonStyle's defined earlier are retained.
+#
+
+Mouse 0 1 A Popup Window-Ops
+Mouse 0 2 A Close
+Mouse 0 4 A Maximize 0 100
+Mouse 0 6 A Iconify
+
+
+#
+# Section: Key bindings
+#
+# This section binds some actions to keys. The bindings have been inspired
+# by MWM, Windows, and nightmares. Everything that these key bindings do,
+# can be done without them. Therefore they should not be too much of a
+# burden on new users, but it definitely _can_ be confusing to press a
+# key by accident and have it do something completely unexpected.
+#
+
+Key Tab A M Next [CurrentDesk !iconic] Focus
+Key Tab A MS Prev [CurrentDesk !iconic] Focus
+Key Tab A CM Next [CurrentDesk] deiconify-and-focus
+Key Tab A CMS Prev [CurrentDesk] deiconify-and-focus
+Key Left A M Desk -1 0
+Key Up A M Desk -1 0
+Key Right A M Desk 1 0
+Key Down A M Desk 1 0
+Key F1 A M Popup Window-Ops
+Key F2 A M Popup /Debian
+Key F3 A M Lower
+Key F4 A M WindowList
+Key F5 A M CirculateUp
+Key F6 A M CirculateDown
+Key F7 A M Move
+Key F8 A M Resize
+Key F9 A M Iconify
+Key F10 A M Maximize
+
+Key F1 A C exec /usr/bin/X11/xterm_color -sb -sl 500 -j -ls -fn 7x14 -geometry 80x30
+#
+# Section: Functions
+#
+# This section defines various functions. Not all of these are used by
+# the default bindings, but they can be useful for a user who wants to
+# customize things.
+#
+#
+# The following functions operate on a window or menu. The
+# names are systematic: foo means "do foo"; foo-or-bar means
+# "do foo, if mouse is moving, bar if click"; and foo-or-bar-or-baz
+# adds "baz, if double-clicked".
+#
+
+DestroyMenu move-or-winmenu-or-deiconify
+AddToFunc move-or-winmenu-or-deiconify
++ "M" Move
++ "C" Popup Window-Ops
++ "D" Iconify
+
+DestroyMenu deiconify-and-focus
+AddToFunc deiconify-and-focus
++ "I" Iconify -1
++ "I" Focus
+
+DestroyMenu deiconify-and-raise
+AddToFunc deiconify-and-raise
++ "I" Iconify -1
++ "I" Raise
+
+DestroyMenu move-or-raiselower
+AddToFunc move-or-raiselower
++ "M" Move
++ "C" RaiseLower
+
+DestroyMenu move-or-raise
+AddToFunc move-or-raise
++ "M" Move
++ "C" Raise
+
+DestroyMenu move-or-lower
+AddToFunc move-or-lower
++ "M" Move
++ "C" Lower
+
+DestroyMenu move-and-raise-or-raiselower
+AddToFunc move-and-raise-or-raiselower
++ "M" Move
++ "M" Raise
++ "C" RaiseLower
+
+DestroyMenu move-or-raiselower-or-maximize-vertical
+AddToFunc move-or-raiselower-or-maximize-vertical
++ "M" Move
++ "C" RaiseLower
++ "D" Maximize 0 100
+
+DestroyMenu resize-or-raiselower
+AddToFunc resize-or-raiselower
++ "M" Resize
++ "C" RaiseLower
+
+#
+# Section: post.hook
+#
+# Use post.hook to force things that may have been changed earlier, for
+# example, key bindinds.
+#
+
+Read /etc/X11/fvwm2/post.hook
+Read .fvwm2/post.hook
diff --git a/examples/system.fvwm2rc95 b/examples/system.fvwm2rc95
new file mode 100644
index 0000000..ba8a7bb
--- /dev/null
+++ b/examples/system.fvwm2rc95
@@ -0,0 +1,520 @@
+#
+# .fvwm2rc95 example configuration file for fvwm95-2.0.41
+#
+
+#========================================================================#
+
+#
+# Fonts - one for window titles, another for icons, and another for the menus
+#
+WindowFont -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*
+IconFont fixed
+MenuFont -adobe-helvetica-medium-r-*-*-*-120-*-*-*-*-*-*
+
+#
+# Set the default window colors. The syntax is:
+# DefaultColors winforecolor winbackcolor titleforecolor titlebackcolor
+# where:
+# winbackcolor is the background (border) color of all windows,
+# including the menu windows
+# winforecolor is used for the menu text
+# titlebackcolor is the background color used for title bars of
+# non selected windows
+# titleforecolor is the color of the title text of non selected windows
+#
+DefaultColors Black #c0c0c0 #c0c0c0 grey51
+
+#
+# Text and background color for the title bar of the active (selected) window
+#
+HilightColors White #000080
+
+#
+# Text and background color for the title bar of sticky windows
+#
+StickyColors grey51 #60c080
+
+# You can also use the Style command to set the colors of individual
+# title bars of some non-selected windows
+
+#Style "*" ForeColor #c0c0c0
+#Style "*" BackColor grey51
+
+#========================================================================#
+
+#
+# Set up the major operating modes
+#
+
+Style "*" ClickToFocus
+# Comment the above and uncomment one of the following if you prefer
+# focus follow mouse.
+#Style "*" MouseFocus
+#Style "*" SloppyFocus
+
+# If we use the FvwmTaskBar we don't need the icons :-)
+# Style "..." Icon are also commented below.
+Style "*" NoIcon
+Style "*" MWMFunctions
+Style "*" HintOverride
+Style "*" MWMDecor
+Style "*" DecorateTransient
+
+OpaqueMoveSize 100
+EdgeScroll 100 100
+EdgeResistance 10000 0
+
+#
+# RandomPlacement prevents user interaction while placing windows:
+#
+Style "*" RandomPlacement
+
+#
+# NoPPosition instructs fvwm to ignore the PPosition field in window
+# geometry hints. Emacs annoyingly sets PPosition to (0,0)!
+#
+Style "*" NoPPosition
+
+Read /etc/X11/fvwm95/pre.hook
+Read .fvwm95/pre.hook
+
+#========================================================================#
+
+#
+# Set the desk top size in units of physical screen size
+#
+
+
+
+
+DeskTopSize 3x2
+
+#========================================================================#
+
+#
+# Module path and paths to the icons
+# ModulePath is a colon-separated list, just like regular unix PATH
+#
+ModulePath /usr/X11R6/lib/X11/fvwm95-2/
+PixmapPath /usr/X11R6/pixmaps:/usr/include/X11/pixmaps/:/usr/local/mini-icons/
+IconPath /usr/X11R6/icons:/usr/include/X11/bitmaps/:/usr/local/icons/
+
+#========================================================================#
+
+# Set the decoration styles and window options
+# If compatible styles are set for a single window in multiple Style
+# commands, then the styles are ORed together. If conflicting styles
+# are set, the last one specified is used.
+
+# These commands should command before any menus or functions are defined,
+# and before the internal pager is started.
+
+#
+# Default border and handle widths
+#
+Style "*" BorderWidth 5, HandleWidth 5
+
+Style "Fvwm*" NoTitle, Sticky, WindowListSkip
+Style "Fvwm Pager" StaysOnTop, NoHandles
+Style "FvwmBanner" StaysOnTop
+Style "FvwmButtons" NoTitle, NoHandles, Sticky, WindowListSkip,BorderWidth 5
+Style "*lock" NoTitle, NoHandles, Sticky, WindowListSkip
+Style "xbiff" NoTitle, Sticky, WindowListSkip
+
+#
+# Some mini-icons for the title bar
+#
+Style "*" TitleIcon mini-x2.xpm
+Style "*xterm*" TitleIcon mini-term.xpm
+Style "rxvt" TitleIcon mini-term.xpm
+Style "xcalc" TitleIcon mini-calc.xpm
+Style "xsession" TitleIcon mini-bx2.xpm
+Style "xv" TitleIcon mini-xv.xpm
+Style "Netscape" TitleIcon mini-nscape.xpm
+Style "xmag" TitleIcon mini-zoom.xpm
+Style "editor" TitleIcon mini-edit.xpm
+Style "tkps" TitleIcon mini-run.xpm
+Style "Ghostview" TitleIcon mini-gv.xpm
+Style "Xcolorsel" TitleIcon mini-colors.xpm
+Style "IDL*" TitleIcon mini-zoom.xpm
+Style "xeyes" TitleIcon mini-eyes.xpm
+Style "*fm*" TitleIcon mini-filemgr.xpm
+# xman resource names
+Style "topBox" TitleIcon mini-book1.xpm
+Style "help" TitleIcon mini-book2.xpm
+Style "manualBrowser" TitleIcon mini-book2.xpm
+# xpaint resource names
+Style "xpaint" TitleIcon mini-paint.xpm
+Style "Canvas" TitleIcon mini-paint.xpm
+Style "fatbits" TitleIcon mini-paint.xpm
+Style "filebrowser" TitleIcon mini-ofolder.xpm
+
+Style "FvwmFile" TitleIcon mini-ofolder.xpm
+Style "XDbx" TitleIcon mini-bug2.xpm
+
+
+#Style "rxvt" Icon term.xpm
+#Style "xterm" Icon xterm.xpm
+#Style "color_xterm" Icon rterm.xpm
+#Style "Appointment" Icon datebook.xpm
+#Style "xcalc" Icon Rcalc.xpm
+#Style "xbiff" Icon mail1.xpm
+#Style "xmh" Icon mail1.xpm, StartsOnDesk 2
+#Style "xman" Icon xman.xpm
+#Style "xvgr" Icon graphs.xpm
+#Style "matlab" Icon math4.xpm
+#Style "xmag" Icon mag_glass.xpm
+#Style "xgraph" Icon graphs.xpm
+#Style "xv" Icon xview.xpm
+#Style "FvwmButtons" Icon toolbox.xpm
+#Style "xconsole" Icon koala.xpm
+#Style "xsession" Icon koala.xpm
+#Style "editor" Icon textedit.xpm
+#Style "ghostview" Icon gv.xpm
+
+#========================================================================#
+
+#
+# Stuff to do at start-up
+#
+
+AddToFunc "InitFunction" "I" Exec xsetroot -solid cyan4 &
+#+ "I" Module FvwmBanner
++ "I" Module FvwmButtons
++ "I" Module FvwmTaskBar
+#+ "I" Module FvwmPager 0 3
+
+AddToFunc "RestartFunction" "I" Module FvwmButtons
++ "I" Module FvwmTaskBar
+#+ "I" Module FvwmPager 0 3
+
+
+#========================================================================#
+
+# Now define some handy complex functions
+
+#
+# This one moves and then raises the window if you drag the mouse,
+# only raises the window if you click, or does a full maximize if
+# you double click
+#
+AddToFunc "Move-or-Raise" "M" Move
++ "M" Raise
++ "C" Raise
++ "D" Maximize 100 100
+
+#
+# This one moves and then lowers the window if you drag the mouse,
+# only lowers the window if you click, or does a RaiseLower if you double
+# click
+#
+AddToFunc "Move-or-Lower" "M" Move
++ "M" Lower
++ "C" Lower
++ "D" RaiseLower
+
+#
+# This one moves or (de)iconifies:
+#
+AddToFunc "Move-or-Iconify" "M" Move
++ "D" Iconify
+
+#
+# This one resizes and then raises the window if you drag the mouse,
+# only raises the window if you click, or does a RaiseLower if you double
+# click
+#
+AddToFunc "Resize-or-Raise" "M" Resize
++ "M" Raise
++ "C" Raise
++ "D" RaiseLower
+
+
+#
+# The main menu.
+#
+
+
+#
+# Read in system and user menu definitions.
+#
+
+Read /etc/X11/fvwm95/menudefs.hook
+Read .fvwm95/menudefs.hook
+
+AddToMenu /Debian
++ "" Nop
++ "Exit Fvwm" Popup Quit-Verify
+
+
+#========================================================================#
+#
+# The Window-Ops menu is for manipulating windows. It is invoked either
+# from the main menu, or directly from the root window.
+#
+
+
+#
+# Now define the menus - defer bindings until later
+#
+
+# This is for the Start menu of the FvwmTaskBar
+
+
+#
+# This defines the most common window operations
+#
+AddToMenu "Window" "Window Ops" Title
++ "&Move" Function Move-or-Raise
++ "&Resize" Function Resize-or-Raise
++ "R&aise%mini-raise.xpm%" Raise
++ "&Lower%mini-lower.xpm%" Lower
++ "(De)Iconify" Iconify
++ "(Un)Stick" Stick
++ "(Un)Maximize" Maximize 100 100
++ "" Nop
++ "Kill" Destroy
++ "&Close" Delete
++ "" Nop
++ "Switch to..." WindowList
++ "Refresh Screen%mini-ray.xpm%" Refresh
+
+# This menu is invoked as a sub-menu - it allows you to quit,
+# restart, or switch to another WM.
+
+AddToMenu "Quit-Verify" "Really Quit Fvwm?" Title
++ "Restart%mini-turn.xpm%" Restart fvwm95-2
++ "" Nop
++ "Fvwm95" Restart /usr/bin/X11/fvwm95-2
++ "Fvwm95" Restart /usr/bin/X11/fvwm95-2
++ "Fvwm95" Restart /usr/bin/X11/fvwm95-2
++ "Yes, Really Quit%mini-exclam.xpm%" Quit
++ "No, Don't Quit%mini-cross.xpm%" Nop
+
+
+#
+# A trimmed down version of "Window Ops", good for binding to decorations
+#
+AddToMenu "Window-Ops2" "&Restore" Iconify -1
++ "&Move" Move-or-Raise
++ "&Size" Resize-or-Raise
++ "Mi&nimize" Iconify 1
++ "Ma&ximize" Maximize 100 100
++ "" Nop
++ "&Kill" Destroy
++ "&Close Alt+F4" Delete
+
+#========================================================================#
+
+#
+# One more complex function - couldn't be defined earlier because it used
+# pop-up menus
+#
+# This creates the "system" menu for the title-bar window-ops
+# pop-up
+#
+AddToFunc "window_ops_func" "C" PopUp Window-Ops2
++ "M" PopUp Window-Ops2
++ "D" Delete
+
+
+#========================================================================#
+
+#
+# Mouse bindings
+#
+
+# First, for the mouse in the root window
+# Button 1 gives the Utilities menu
+# Button 2 gives the Window Ops menu
+# Button 3 gives the WindowList (like TwmWindows)
+# I use the AnyModifier (A) option for the modifier field, so you can hold down
+# any shift-control-whatever combination you want!
+
+# Button Context Modifi Function
+Mouse 1 R A Menu "/Debian" Nop
+Mouse 2 R A Menu "Window Ops" Nop
+Mouse 3 R A WindowList
+#Mouse 3 R A Module "winlist" FvwmWinList transient
+
+# Now the title bar buttons
+# Any button in the left title-bar button gives the window ops menu
+# Any button in the first right title-bar button Iconifies the window
+# Any button in the second title-bar button full-maximizes
+# Any button in the third (rightmost) title-bar button closes
+# Note the use of "Mouse 0" for AnyButton.
+
+# Button Context Modif Function
+Mouse 0 1 A Function "window_ops_func"
+Mouse 1 2 A Delete
+Mouse 0 4 A Maximize 100 100
+Mouse 0 6 A Iconify
+
+#
+# Now the rest of the frame
+# Here I invoke my complex functions for Move-or-lower, Move-or-raise,
+# and Resize-or-Raise.
+#
+# Button 1 in the corner pieces, with any modifiers, gives resize or raise
+Mouse 1 F A Function "Resize-or-Raise"
+# Button 1 in the title, sides, or icon, w/ any modifiers, gives move or raise
+Mouse 1 TS A Function "Move-or-Raise"
+
+# Button 1 in an icons gives move for a drag, de-iconify for a double-click,
+# nothing for a single click
+# Button 2 in an icon, w/ any modifiers, gives de-iconify
+Mouse 1 I A Function "Move-or-Iconify"
+Mouse 2 I A Iconify
+
+# Button 2 in the corners, sides, or title-bar gives the window ops menu
+Mouse 2 FST A Function "window_ops_func"
+
+# Button 3 anywhere in the decoration (except the title-bar buttons)
+# does a raise-lower
+Mouse 3 TSIF A RaiseLower
+
+# Button 3 in the window, with the Modifier-1 key (usually alt or diamond)
+# gives Raise-Lower. Used to use control here, but that interferes with xterm
+Mouse 3 W M RaiseLower
+
+#========================================================================#
+
+# Now some keyboard shortcuts.
+
+# Arrow Keys
+# press arrow + control anywhere, and scroll by 1 page
+Key Left A C Scroll -100 0
+Key Right A C Scroll +100 +0
+Key Up A C Scroll +0 -100
+Key Down A C Scroll +0 +100
+
+# press arrow + meta key, and scroll by 1/10 of a page
+Key Left A M Scroll -10 +0
+Key Right A M Scroll +10 +0
+Key Up A M Scroll +0 -10
+Key Down A M Scroll +0 +10
+
+# press shift arrow + control anywhere, and move the pointer by 1% of a page
+Key Left A SC CursorMove -1 0
+Key Right A SC CursorMove +1 +0
+Key Up A SC CursorMove +0 -1
+Key Down A SC CursorMove +0 +1
+
+# press shift arrow + meta key, and move the pointer by 1/10 of a page
+Key Left A SM CursorMove -10 +0
+Key Right A SM CursorMove +10 +0
+Key Up A SM CursorMove +0 -10
+Key Down A SM CursorMove +0 +10
+
+# Keyboard accelerators
+Key F1 A M Popup "Utilities"
+Key F1 A M Popup "Utilities"
+Key F2 A M Popup "Window Ops"
+Key F3 A M Module "WindowList" FvwmWinList
+Key F4 A M Iconify
+Key F5 A M Move
+Key F6 A M Resize
+
+#Page Up/Dapge Down keys are used to scroll by one desktop page
+# in any context, press page up/down + control
+# in root context, just pressing page up/down is OK
+#
+# I prefer the non-wrapping scroll. These are for example purposes only
+#Key Next A C Scroll 100000 0
+#Key Next R N Scroll 100000 0
+#Key Prior A C Scroll -100000 0
+#Key Prior R N Scroll -100000 0
+
+Key Tab A M Prev Focus
+Key Tab A MS Next Focus
+
+Key Escape A C WindowList
+
+#========================================================================#
+
+# Definitions used by the modules
+
+#------------------ Pager
+*FvwmPagerBack grey60
+*FvwmPagerFore black
+*FvwmPagerFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
+*FvwmPagerHilight #c0c0c0
+*FvwmPagerGeometry -1-1
+*FvwmPagerLabel 0 Desktop
+*FvwmPagerSmallFont 5x8
+
+#------------------ FvwmButtons (from 2.0.42)
+*FvwmButtonsFore Black
+*FvwmButtonsBack #c0c0c0
+*FvwmButtonsFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
+# Geometry - really likes to pick its own size, but giving a position is OK
+*FvwmButtonsGeometry -5-34
+# Layout: specify rows or columns, not both
+*FvwmButtonsRows 1
+
+# Define the buttons to use.....
+
+*FvwmButtons(Title xclock, Icon clock.xpm, \
+ Swallow(UseOld) "xclock" 'Exec /usr/bin/X11/xclock -bg \#c0c0c0 \
+ -padding 0 -geometry -1500-1500 &')
+*FvwmButtons(2x1, Title load, \
+ Swallow(UseOld) "xload" 'Exec /usr/bin/X11/xload \
+ -nolabel -bg grey60 -update 5 -geometry -1500-1500 &')
+*FvwmButtons(Title xterm, Icon rterm.xpm, \
+ Action 'Exec "XTerm" xterm_color \
+ -ls -sb -fn 8x13 -title "Color xterm" &')
+*FvwmButtons(Title Files, Icon Xfm.xpm, \
+ Action 'Exec "Files" files &')
+*FvwmButtons(Title Editor, Icon textedit.xpm, \
+ Action 'Exec "editor" editor &')
+*FvwmButtons(Title xcalc, Icon rcalc.xpm, \
+ Action 'Exec "Calculator" xcalc &')
+*FvwmButtons(Title xview, Icon xview.xpm, \
+ Action 'Exec "xv" xv &')
+*FvwmButtons(Title gview, Icon gv.xpm, \
+ Action 'Exec "ghostview" ghostview &')
+*FvwmButtons(Title netscape, Icon nscape.xpm, \
+ Action 'Exec "Netscape" netscape -geometry 920x622+90+5 &')
+*FvwmButtons(Title kill, Icon rbomb.xpm, Action Destroy)
+*FvwmButtons(2x1, Swallow(UseOld) "Desktop" 'FvwmPager 0 0')
+
+#------------------ Identify
+*FvwmIdentBack #000080
+*FvwmIdentFore Yellow
+*FvwmIdentFont -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*
+
+#------------------ FvwmWinList
+*FvwmWinListBack #c0c0c0
+*FvwmWinListFore Black
+*FvwmWinListFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
+*FvwmWinListAction Click1 Iconify -1,Focus
+*FvwmWinListAction Click2 Iconify
+*FvwmWinListAction Click3 Module "FvwmIdent" FvwmIdent
+*FvwmWinListUseSkipList
+*FvwmWinListGeometry +0-1
+*FvwmWinListShowCurrentDesk
+
+#------------------ FvwmTaskBar
+Style "FvwmTaskBar" NoTitle,BorderWidth 4,HandleWidth 4,Sticky,StaysOnTop,WindowListSkip,CirculateSkip
+
+*FvwmTaskBarGeometry +0-0
+*FvwmTaskBarFore Black
+*FvwmTaskBarBack #c0c0c0
+*FvwmTaskBarTipsFore black
+*FvwmTaskBarTipsBack bisque
+*FvwmTaskBarFont -adobe-helvetica-medium-r-*-*-*-120-*-*-*-*-*-*
+*FvwmTaskBarSelFont -adobe-helvetica-bold-r-*-*-*-120-*-*-*-*-*-*
+*FvwmTaskBarAction Click1 Iconify -1,Raise,Focus
+*FvwmTaskBarAction Click2 Iconify
+*FvwmTaskBarAction Click3 Module "FvwmIdent" FvwmIdent
+*FvwmTaskBarUseSkipList
+*FvwmTaskBarAutoStick
+*FvwmTaskBarStartName Start
+*FvwmTaskBarStartMenu /Debian
+*FvwmTaskBarStartIcon mini-exp.xpm
+*FvwmTaskBarShowTips
+#*FvwmTaskBarShowTransients
+#*FvwmTaskBarClockFormat %I:%M%p
+#*FvwmTaskBarHighlightFocus
+#*FvwmTaskBarAutoHide
+*FvwmTaskBarMailCommand Exec xterm_color -T Mail -ls -fn 8x13 -e pine -i
diff --git a/examples/system.fvwmrc-menu b/examples/system.fvwmrc-menu
new file mode 100644
index 0000000..00eb0f4
--- /dev/null
+++ b/examples/system.fvwmrc-menu
@@ -0,0 +1,513 @@
+# /etc/X11/fvwm/system.fvwmrc
+# Based heavily on system.fvwm, with modifications to bring it in line with
+# the previous debian fvwm package.
+#
+# See the fvwm(1) manpage for more details.
+#
+# This file is used if the user's ~/.fvwmrc is not found.
+#
+# Austin Donnelly <and1000@debian.org>
+#
+
+# Unfortunately, order does matter in this file
+# The correct order for inserting configurations is:
+# 1. Colors
+# 2. Assorted configuration paramters such as ClickToFocus, or MWMBorders
+# 3. Path setup (ModulePath, PixmapPath, IconPath)
+# 4. Style settings, including the default style Style "*" ...
+# 5. InitFunction and ResetFunction definitions.
+# 6. Other Functions. Functions cannot be forward referenced from
+# other functions, but they can be backward referenced.
+# 7. Menus definitions. Same caveats about forward referencing
+# 8. Key and Mouse Bindings.
+# 9. Module options.
+
+# The order of steps 5, 6, and 7 is not critical, as long as there are
+# no forward references to functions or menus.
+
+# If you get it wrong, the most common problem is that color or font settings
+# are ignored
+
+###########################################################################
+# set up the colors
+#
+
+# this is used for the selected window
+HiForeColor Black
+HiBackColor #5f9ea0
+
+# colours for non-selected windows
+StdForeColor Black
+StdBackColor Grey55
+
+# used for the pager
+PagerForeColor Black
+PagerBackColor #5f9ea0
+
+# used for windows that stick to the glass
+StickyForeColor Black
+StickyBackColor Grey75
+
+# Menu colors
+MenuForeColor Black
+MenuBackColor #5f9ea0
+MenuStippleColor SlateGrey
+
+############################################################################
+# Now the fonts - one for menus, another for window titles, another for icons
+# The menu font
+Font -adobe-times-bold-r-*-*-14-*-*-*-*-*-*-*
+# The font used in the window title bars.
+WindowFont -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*
+# Font used to title icons with
+IconFont -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*
+
+###########################################################################
+# Set up the major operating modes
+#
+######################## FOCUS STUFF ##############################
+# Set windows to auto-raise after 750 milliseconds if you like it.
+# Autoraise can sometimes obscure pop-up windows. Performance is now
+# similar to olvwm's auto-raise feature.
+#AutoRaise 750
+
+# Normally, we'll be in focus-follows mouse mode, but uncomment this
+# for mwm-style click-to-focus
+#ClickToFocus
+
+######################## ICON STUFF ##############################
+# Auto Place Icons is a nice feature....
+# Area of screen where icons are dumped (left top right bottom)
+# First go along RHS...
+IconBox -100 +140 -1 +730
+# ...next go along the bottom:
+IconBox +10 -40 +828 -1
+
+# If you uncomment this, and make sure that the WindowList is bound to
+# something, it works pretty much like an icon manager.
+#SuppressIcons
+
+# StubbornIcons makes icons de-iconify into their original position on the
+# desktop, instead of on the current page.
+#StubbornIcons
+
+# With AutoPlacement, icons will normally place themselves underneath active
+# windows. This option changes that.
+StubbornIconPlacement
+
+# If you want ALL you icons to follow you around the desktop (Sticky), try
+# this
+StickyIcons
+
+######################## MWM EMULATION #######################
+#
+# My feeling is that everyone should use MWMDecorHints and MWMFunctionHints,
+# since some applications depend on having the window manager respect them
+
+# MWMFunction hints parses the function information in the MOTIF_WM_HINTS
+# property, and prohibits use of these functions on the window. Appropriate
+# portions of the window decorations are removed.
+MWMFunctionHints
+
+# MWM is kinda picky about what can be done to transients, and it was keeping
+# me from iconifying some windows that I like to iconify, so here's an
+# over-ride that will allow me to do the operation, even tough the menu
+# item is shaded out.
+MWMHintOverride
+
+# MWMDecor hints parses the decoration information in the MOTIF_WM_HINTS
+# property, and removes these decoratons from the window. This does not affect
+# the functions that can be performed via the menus.
+MWMDecorHints
+
+# These are affect minor aspects for the look-and-feel.
+# Sub-menus placement mwm-style?
+MWMMenus
+# mwm-style border reliefs (less deep than default fvwm) ?
+# MWMBorders
+# Maximize button does mwm-inversion thingy
+MWMButtons
+######################## MISCELLANEOUS STUFF #######################
+# If you don't like the default 150 msec click delay for the complex functions
+# change this and uncomment it.
+#ClickTime 150
+
+# OpaqueMove has a number (N) attached to it (default 5).
+# if the window occupies less than N% of the screen,
+# then opaque move is used. 0 <= N <= 100
+OpaqueMove 20
+
+# flip by whole pages on the edge of the screen.
+EdgeScroll 100 100
+
+# A modest delay before flipping pages seems to be nice...
+# I thresh in a 50 pixel Move-resistance too, just so people
+# can try it out.
+EdgeResistance 250 50
+
+
+######################## WINDOW PLACEMENT #######################
+# RandomPlacement prevents user interaction while placing windows:
+# RandomPlacement
+
+# SmartPlacement makes new windows pop-up in blank regions of screen
+# if possible, or falls back to random or interactive placement.
+SmartPlacement
+
+# With SmartPlacement, windows will normally place themselves over icons.
+# Uncomment this to change that.
+#StubbornPlacement
+
+# NoPPosition instructs fvwm to ignore the PPosition field in window
+# geometry hints. Emacs annoyingly sets PPosition to (0,0)!
+NoPPosition
+
+
+######################## DECORATIONS #######################
+# If you want decorated transient windows, uncomment this:
+#DecorateTransients
+
+
+###########################################################################
+# Set up the virtual desktop and pager
+
+# use the internam pager, rather than the module
+Pager 5 5
+
+#set the desk top size in units of physical screen size
+DeskTopSize 2x2
+
+# and the reduction scale used for the panner/pager
+DeskTopScale 60
+
+##########################################################################
+# Module path and paths to the icons
+#
+# ModulePath is a colon-separated list, just like regular unix PATH
+ModulePath /usr/lib/X11/fvwm
+PixmapPath /usr/include/X11/pixmaps/
+IconPath /usr/include/X11/bitmaps/
+
+############################################################################
+# Set the decoration styles and window options
+# Order is important!!!!
+# If compatible styles are set for a single window in multiple Style
+# commands, then the styles are ORed together. If conflicting styles
+# are set, the last one specified is used.
+
+# These commands should command before any menus or functions are defined,
+# and before the internal pager is started.
+
+# change the default width.
+Style "*" BorderWidth 5, HandleWidth 5, Color Black/#60a0c0,Icon unknown1.xpm
+
+Style "Fvwm*" NoTitle, NoHandles, Sticky, WindowListSkip,BorderWidth 0, CirculateSkip
+Style "Fvwm Pager" StaysOnTop, BorderWidth 5, Color Black/#5f9ea0
+Style "FvwmPager" StaysOnTop, BorderWidth 5
+Style "FvwmBanner" StaysOnTop
+Style "GoodStuff" NoTitle, NoHandles, Sticky, WindowListSkip,BorderWidth 0
+Style "*lock" NoTitle, NoHandles, Sticky, WindowListSkip
+Style "xbiff" NoTitle, Sticky, WindowListSkip, CirculateSkip
+Style "xload" NoTitle, Sticky, WindowListSkip, CirculateSkip
+Style "rxvt" Icon term.xpm
+Style "xterm" Icon xterm.xpm, Color black/grey
+Style "xconsole" Icon xterm.xpm
+Style "Appointment" Icon datebook.xpm, NoButton 2, NoButton 4
+Style "xclock" NoTitle, Sticky, WindowListSkip, CirculateSkip
+Style "xcalc" Icon xcalc.xpm, NoButton 2
+Style "xcal" NoTitle, NoHandles, Sticky, WindowListSkip, CirculateSkip
+Style "xmh" Icon mail1.xpm, StartsOnDesk 2, NoButton 2
+Style "xman" Icon xman.xpm
+Style "xvgr" Icon graphs.xpm
+Style "matlab" Icon math4.xpm
+Style "xmag" Icon mag_glass.xpm
+Style "xgraph" Icon graphs.xpm
+Style "GoodStuff" Icon toolbox.xpm
+
+# This next one will need to be changed when emacs gets upgraded... :(
+Style "emacs" Icon /usr/lib/emacs/19.29/etc/gnu.xpm, Color Black/#f061c709e096
+
+
+
+# Change the Maximize and iconify buttons to up and down triangles.
+
+ButtonStyle : 2 4 50x35@1 65x65@0 35x65@0 50x35@1
+ButtonStyle : 4 4 50x65@1 35x35@1 65x35@1 50x65@0
+
+
+############################################################################
+# Now define some handy complex functions
+
+Function "RaiseLowerOrMove"
+ Move "motion"
+ RaiseLower "click"
+EndFunction
+
+Function "RaiseOrMove"
+ Move "motion"
+ Raise "click"
+EndFunction
+
+Function "LowerOrMove"
+ Move "motion"
+ Lower "click"
+EndFunction
+
+Function "IconifyOrMove"
+ Move "motion"
+ Iconify "click"
+ Iconify "doubleclick"
+EndFunction
+
+Function "DoubleClickIconify"
+ Iconify "click"
+ Iconify "doubleclick"
+EndFunction
+
+
+Function "InitFunction"
+ Exec "I" xmodmap -e "keycode 107 = 0x04"
+ #Exec "I" xhost +
+ Exec "I" xsetroot -solid steelblue
+ Module "I" GoodStuff
+ Desk "I" 0 2
+ Desk "I" 0 0
+EndFunction
+
+Function "RestartFunction"
+ Exec "I" xsetroot -solid "#266294"
+ Module "I" GoodStuff
+ Module "I" FvwmPager 0 3
+EndFunction
+
+
+include-menu-defs
+
+
+##Old-Debian ##############################################################################
+##Old-Debian # now define the menus
+##Old-Debian #
+##Old-Debian
+##Old-Debian # Provides a list of modules to fire off
+##Old-Debian
+##Old-Debian
+##Old-Debian Popup "Applications"
+##Old-Debian Title "Applications"
+##Old-Debian Exec "xterm" exec xterm &
+##Old-Debian Nop ""
+##Old-Debian Exec "Emacs" exec emacs &
+##Old-Debian Exec "Emacs RMAIL" exec emacs -f rmail &
+##Old-Debian Exec "Netscape" exec netscape &
+##Old-Debian EndPopup
+##Old-Debian
+Popup "Module-Popup"
+ Title "Modules"
+ Module "GoodStuff" GoodStuff
+ Module "Clean-Up" FvwmClean
+ Module "Identify" FvwmIdent
+ Module "SaveDesktop" FvwmSave
+ Module "Debug" FvwmDebug
+ Module "Pager" FvwmPager 0 3
+ Module "FvwmWinList" FvwmWinList
+EndPopup
+
+Popup "Fvwm"
+ Title "Fvwm"
+ Iconify "Iconify"
+ Module "Identify" FvwmIdent
+ Maximize "Maximize"
+ Move "Move"
+ Resize "Resize"
+ Stick "Stick"
+ Raise "Raise"
+ Lower "Lower"
+ Nop ""
+ Destroy "Kill"
+ Delete "Delete"
+ Nop ""
+ Popup "Modules" Module-Popup
+ Nop ""
+ Refresh "Refresh"
+ Restart "Restart" fvwm
+ Quit "Exit fvwm"
+EndPopup
+
+
+Popup "Window"
+ Iconify "Iconify"
+ Maximize "Maximize"
+ Move "Move"
+ Resize "Resize"
+ Stick "Stick"
+ Raise "Raise"
+ Lower "Lower"
+ Nop ""
+ Destroy "Kill"
+ Delete "Delete"
+EndPopup
+
+
+
+##############################################################################
+# This defines the mouse bindings
+
+# First, for the mouse in the root window
+# Button 1 gives the Applications menu
+# Button 2 gives the Window Ops menu
+# Button 3 gives the WindowList (like TwmWindows)
+# I use the AnyModifier (A) option for the modifier field, so you can hold down
+# any shift-control-whatever combination you want!
+
+# Button Context Modifi Function
+Mouse 1 R A PopUp "/Debian"
+Mouse 2 R A PopUp "Fvwm"
+Mouse 3 R A WindowList
+
+
+# Now the title bar buttons
+# Any button in the left title-bar button gives the window ops menu
+# Any button in the right title-bar button Iconifies the window
+# Any button in the rightmost title-bar button maximizes
+# Note the use of "Mouse 0" for AnyButton.
+
+# Button Context Modifi Function
+Mouse 0 1 N PopUp "Window"
+Mouse 0 2 N Maximize
+Mouse 0 4 N Iconify
+
+# Mouse buttons with the Meta (alt) key down always apply, even _inside_
+# the application's window.
+# (a) This is a little on the sneaky side: applications will never
+# get to see meta mouse clicks - but then I haven't yet found
+# one that does respond to them, other than emacs.
+# (b) Its a very fast way of working one you get used to it.
+Mouse 1 FSTW M Function "RaiseOrMove"
+Mouse 2 FSTWI M Iconify
+Mouse 3 FSTW M RaiseLower
+
+# Now the rest of the frame
+
+# Button 1 in the corner pieces, with any modifiers, gives resize
+# 2 in the corner pieces, with any modifiers, gives resize
+# 3 in the corner pieces, with any modifiers, will raise or lower it
+Mouse 1 F A Resize
+Mouse 2 F A Resize
+Mouse 3 F A RaiseLower
+
+# A click of button 1 on any of the sides will resize the window.
+# A click of button 2 on any of the sides will resize the window.
+# A click of button 3 on any of the sides will raise or lower it.
+Mouse 1 S N Resize
+Mouse 2 S N Resize
+Mouse 3 S N RaiseLower
+
+# A click of button 1 in the title bar will call "RaiseOrMove".
+# A click of button 2 in the title bar will call "LowerOrMove".
+# A click of button 3 in the title bar will raise or lower it.
+Mouse 1 T N Function "RaiseOrMove"
+Mouse 2 T N Function "LowerOrMove"
+Mouse 3 T N RaiseLower
+
+# A click of button 1 on an icon will call "IconifyOrMove".
+# A click of button 2 on an icon will call "IconifyOrMove".
+# A click of button 3 on an icon will raise or lower it.
+Mouse 1 I N Function "IconifyOrMove"
+Mouse 2 I N Function "IconifyOrMove"
+Mouse 3 I N RaiseLower
+
+
+############################################################################
+# Now some keyboard shortcuts.
+
+# Arrow Keys
+# press arrow + control anywhere, and scroll by 1 page
+Key Left A C Scroll -100 0
+Key Right A C Scroll +100 +0
+Key Up A C Scroll +0 -100
+Key Down A C Scroll +0 +100
+
+# Keyboard accelerators
+#Key F1 A M Popup "/Debian"
+#Key F2 A M Popup "Window"
+#Key F3 A M Module "WindowList" FvwmWinList
+#Key F4 A M Iconify
+#Key F5 A M Move
+#Key F6 A M Resize
+#Key F7 A M CirculateUp
+#Key F8 A M CirculateDown
+
+
+
+
+############################################################################
+############################################################################
+#Definitions used by the modules
+
+###################### GoodStuff button-bar ################################
+# Colors
+*GoodStuffFore Black
+*GoodStuffBack #908090
+
+# Font
+*GoodStuffFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
+# Geometry - really likes to pick its own size, but giving a position is OK
+*GoodStuffGeometry -1-1
+
+# Layout: specify rows or columns, not both
+*GoodStuffRows 2
+
+# Define the buttons to use.....
+*GoodStuff Kill rbomb.xpm Destroy
+
+# xterm or rxvts on remote machines can be done like this
+# Output re-direction is csh style, not sh style
+# You will want to substitute your own hosts here!
+
+*GoodStuff Rulgm0 rterm.xpm Exec "" xterm -sb -sl 500 -j -ls -fn 7x7 -T rulgm0 -e r0 &
+*GoodStuff Rulgm4 rterm.xpm Exec "" xterm -sb -sl 500 -j -ls -fn 7x7 -T rulgm4 -e r4 &
+*GoodStuff Ruliln rterm.xpm Exec "" xterm -sb -sl 500 -j -ls -fn 7x7 -T ruliln -e rln &
+*GoodStuff Rulils rterm.xpm Exec "" xterm -sb -sl 500 -j -ls -fn 7x7 -T rulils -e rls &
+*GoodStuff Rulil0 rterm.xpm Exec "" xterm -sb -sl 500 -j -ls -fn 7x7 -T rulil0 -e rl0 &
+*GoodStuff Xcalc rcalc.xpm Exec "" xcalc &
+
+*GoodStuff Paging clamp.xpm TogglePage
+*GoodStuff - clock.xpm Swallow "xclock" xclock -bg \#908090 -geometry -1500-1500 -padding 0
+*GoodStuff(4x1) - whatever SwallowModule "FvwmPager" FvwmPager 0 3
+
+
+######################### No Clutter ########################################
+# I only wrote NoClutter as a simple test case, but maybe some big sites like
+# universities really have usage problems (too many open windows)....
+# Time delays are in seconds.
+*FvwmNoClutter 3600 Iconify 1
+*FvwmNoClutter 86400 Delete
+*FvwmNoClutter 172800 Destroy
+
+########################## Window-Identifier ###############################
+# Just choose colors and a fonts
+*FvwmIdentBack MidnightBlue
+*FvwmIdentFore Yellow
+*FvwmIdentFont -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*
+
+########################### Pager #########################################
+*FvwmPagerBack #908090
+*FvwmPagerFore #484048
+*FvwmPagerFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
+*FvwmPagerHilight #cab3ca
+*FvwmPagerGeometry -1-1
+*FvwmPagerLabel 0 Misc
+*FvwmPagerLabel 1 Maker
+*FvwmPagerLabel 2 Mail
+*FvwmPagerLabel 3 Matlab
+*FvwmPagerSmallFont 5x8
+
+
+##########################FvwmWinList##################################
+*FvwmWinListBack #908090
+*FvwmWinListFore Black
+*FvwmWinListFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
+*FvwmWinListAction Click1 Iconify -1,Focus
+*FvwmWinListAction Click2 Iconify
+*FvwmWinListAction Click3 Module "FvwmIdent" FvwmIdent
+*FvwmWinListUseSkipList
+*FvwmWinListGeometry +0-1
diff --git a/examples/system.steprc-menu b/examples/system.steprc-menu
new file mode 100644
index 0000000..6cb3da5
--- /dev/null
+++ b/examples/system.steprc-menu
@@ -0,0 +1,301 @@
+# 05/18/96 sample.steprc v1.2 fsf
+
+##########################################################################
+# NEXTSTEP(tm) look related stuff
+StdForeColor Black
+StdBackColor #bfbfbf
+HiForeColor White
+HiBackColor Black
+MenuBackColor #bfbfbf
+MenuForeColor Black
+Font -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*
+WindowFont -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*
+IconBox 90 -68 -1 -1
+StickyForeColor Black
+StickyBackColor #60c0a0
+
+######################## FOCUS STUFF ##############################
+# Set windows to auto-raise after 325 milliseconds if you like it.
+Module Auto 325
+
+######################## MISCELLANEOUS STUFF #######################
+# If you don't like the default 150 msec click delay for the complex functions
+# change this.
+ClickTime 150
+
+# StubbornIcons makes icons de-iconify into their original position on the
+# desktop, instead of on the current page.
+#StubbornIcons
+
+# With AutoPlacement, icons will normally place themselves underneath active
+# windows. This option changes that.
+#StubbornIconPlacement
+
+# If you want ALL you icons to follow you around the desktop (Sticky), try
+# this
+StickyIcons
+
+######################## WINDOW PLACEMENT #######################
+# RandomPlacement prevents user interaction while placing windows:
+# RandomPlacement
+
+# SmartPlacement makes new windows pop-up in blank regions of screen
+# if possible, otherwise falls back to random or interactive placement
+#SmartPlacement
+
+EdgeScroll 0 0
+EdgeResistance 0 0
+SloppyFocus
+AppsBackingStore
+BackingStore
+SaveUnders
+
+# OpaqueMove has a number (N) attached to it (default 5), if the window occupies
+# less than N% of the screen, opaque move is used. 0 <= N <= 100
+OpaqueMove 100
+
+# NoPPosition instructs fvwm to ignore the PPosition field in window
+# geometry hints.
+# Emacs annoyingly sets PPosition to (0,0)!
+NoPPosition
+
+###########################################################################
+# Set up the virtual desktop and pager
+
+#set the desk top size in units of physical screen size
+DeskTopSize 2x2
+
+# and the reduction scale used for the panner/pager
+DeskTopScale 32
+
+##########################################################################
+# Module path
+# ModulePath is a colon-separated list, just like regular unix PATH
+ModulePath /usr/X11R6/lib/X11/fvwm:/usr/X11R6/lib/X11/afterstep
+PixmapPath /usr/include/X11/pixmaps/
+IconPath /usr/include/X11/bitmaps/
+NoBoundaryWidth 0
+BoundaryWidth 8
+Style "oclock" Sticky, NoTitle, StaysOnTop, WindowListSkip
+Style "*Pager" NoTitle, Sticky, StaysOnTop, WindowListSkip, NoHandles
+Style "xbiff" NoTitle, WindowListSkip
+Style "Minitabx11" StaysOnTop
+Style "Wharf" NoFocus,NoTitle, Sticky, WindowListSkip,StaysOnTop, NoHandles
+
+##########################################################################
+# customize your wharf (read: dock)
+Module Wharf
+
+# Eliminates the 3D "pushable" buttons and makes things boring
+#*WharfNoPush
+
+*WharfGeometry -1+0
+*WharfColumns 1
+*Wharf xbiff nil Swallow "xbiff" xbiff -bg "#8e8a9e" -fg "#00003f" -geometry 45x45-1-1 &
+*Wharf xload nil Swallow "xload" xload -nolabel -hl black -bg "#8e8a9e" -geometry 45x45-1-1 &
+*Wharf xterm monitor.xpm Exec "-" xterm -e tcsh -l &
+*Wharf lyx text.xpm Exec "-" /home/frank/bin/lyx &>/dev/null &
+*Wharf gimp 3dpaint.xpm Exec "-" gimp -geometry +15+373 &
+#*Wharf tkdate nil Swallow "tkdate" tkdate -geometry -1-1 &
+*Wharf pine writeletter.xpm Exec "-" xterm -T "pine" -e pine &
+*Wharf Netscape netscape3.xpm Exec "-" netscape -geometry 680x565+400+2 &
+*Wharf moxfm FilingCabinet.xpm Exec "-" moxfm >& /dev/null &
+*Wharf pager nil SwallowModule "FvwmPager" FvwmPager 0 0
+*Wharf config interface.xpm Exec "-" xterm -T "vi(.steprc)" -e vim -n ~/.steprc &
+*Wharf Recycler recycler.xpm Restart " " afterstep
+*Wharf Shutdown shutdown.xpm Quit
+##########################################################################
+
+
+############################################################################
+# define some common icon bitmaps
+# These are the color icons.
+# Of course, you need to change the directory to the one where they
+# really live.
+Icon "xterm" monitor.xpm
+Icon "pine" writeletter.xpm
+Icon "ghostview" text.xpm
+Icon "xman" xman.xpm
+Icon "gimp" 3dpaint.xpm
+Icon "xli" monalisa.xpm
+Icon "xv" xv1.xpm
+Icon "moxfm*" FileFolders.xpm
+Icon "*lyx*" text.xpm
+Icon "LyX" text.xpm
+Icon "Untitled*" YellowBlueRedGeometry.xpm
+
+Function "InitFunction"
+ Module "I" FvwmPager 0 0
+EndFunction
+Function "RestartFunction"
+ Module "I" FvwmPager 0 0
+EndFunction
+
+############################################################################
+# Now define some handy complex functions
+
+# This one moves and then raises the window if you drag the mouse,
+# only raises the window if you click, or does a RaiseLower if you double
+# click
+Function "Move-or-Raise"
+ Move "Motion"
+ Raise "Motion"
+ Raise "Click"
+ RaiseLower "DoubleClick"
+EndFunction
+
+Function "maximize_func"
+ Move "Motion"
+ Maximize "Click" 94 100
+ Shade "DoubleClick"
+ PutOnTop "TripleClick"
+EndFunction
+
+# This one moves or (de)iconifies:
+Function "Move-or-Iconify"
+ Move "Motion"
+ Iconify "DoubleClick"
+EndFunction
+
+Function "Resize-or-Raise"
+ Resize "Motion"
+ Raise "Motion"
+ Raise "Click"
+ Shade "DoubleClick"
+EndFunction
+
+# This is provided as a hint only.
+# Move to a known page on the desktop, then start an application in a
+# known location. Could also switch to a known desktop, I guess
+#Function "abs_coord"
+# GoToPage "Immediate" 1,1
+# Exec "Immediate" exec xcalc -geometry +100+100&
+#EndFunction
+
+##############################################################################
+#now define the menus - defer bindings until later
+
+include-menu-defs
+
+# This menu is invoked as a sub-menu - it allows you to quit
+Popup "Quit-Verify"
+ Title "Quit?"
+ Quit "Yes, Quit"
+ Restart "Restart" afterstep
+ Nop "No, Don't"
+EndPopup
+
+# This defines the most common window operations
+Popup "Window Ops"
+ Title "Window Ops"
+ Function "Move" Move-or-Raise
+ Function "Resize" Resize-or-Raise
+ Raise "Raise"
+ Lower "Lower"
+ PutOnTop "(Un)PutOnTop"
+ Iconify "(De)Iconify"
+ Stick "(Un)Stick"
+ Function "(Un)Maximize" maximize_func
+ Nop ""
+ Destroy "Destroy"
+ Close "Close"
+ Nop ""
+ Refresh "Refresh Screen"
+EndPopup
+
+
+##############################################################################
+# This defines the mouse bindings
+
+# First, for the mouse in the root window
+# Button 1 gives the HotList menu
+# Button 2 gives the WindowList menu
+# Button 3 gives the WindowOps
+
+Mouse 0 1 A Iconify
+Mouse 0 2 A Close
+Mouse 1 R A PopUp "/Debian"
+Mouse 1 FS A Function "Resize-or-Raise"
+Mouse 1 I A Function "Move-or-Iconify"
+Mouse 1 T A Function "maximize_func"
+Mouse 2 R A WindowList
+Mouse 2 FST A PopUp "Window Ops"
+Mouse 3 TSIF A RaiseLower
+Mouse 3 R A PopUp "Window Ops"
+Mouse 3 W M RaiseLower
+
+############################################################################
+# Now some keyboard shortcuts.
+
+# Keyboard accelerators
+Key F1 A M Popup "/Debian"
+Key F2 A M Popup "Window Ops"
+Key F3 A M WindowList
+Key F4 A M Exec "xwd" xwd -root -out ~/screen.xwd &
+Key F5 A A Iconify
+
+# Arrow Keys
+# press arrow + control anywhere, and scroll by 1 page
+Key Left A C Scroll -100 0
+Key Right A C Scroll +100 +0
+Key Up A C Scroll +0 -100
+Key Down A C Scroll +0 +100
+############################################################################
+
+############################################################################
+#Definitions used by the modules
+
+########################## Window-Identifier ###############################
+# Just choose colors and a fonts
+*FvwmIdentBack MidnightBlue
+*FvwmIdentFore Yellow
+*FvwmIdentFont -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*
+
+*FvwmPagerBack #908090
+*FvwmPagerFore #484048
+*FvwmPagerFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
+*FvwmPagerHilight #cab3ca
+*FvwmPagerGeometry +8-6
+*FvwmPagerLabel 0 Pager
+*FvwmPagerSmallFont 5x8
+
+*PagerBack #908090
+*PagerFore #484048
+*PagerFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
+*PagerHilight #cab3ca
+*PagerGeometry +8-6
+*PagerLabel 0 Pager
+*PagerSmallFont 5x8
+
+# Start the Audio player
+Module Audio
+
+# Select your normal audio player
+#*AudioPlayCmd /usr/bin/showaudio
+
+# Select the directory containing your sounds
+#*AudioDir /home/frank/mac/sounds
+
+#*AudioDelay 1
+
+# Attach sounds to window manager events...some don't appear to function
+# as well as they could
+#*Audio startup gong.au
+#*Audio shutdown clink.au
+#*Audio add_window bong.au
+#*Audio raise_window drip.au
+#*Audio lower_window drip.au
+#*Audio focus_change drip.au
+#*Audio destroy_window crash.au
+#*Audio iconify ploop.au
+#*Audio deiconify ploop.au
+#*Audio toggle_paging fwop.au
+#*Audio new_page beaming.au
+#*Audio new_desk beam_trek.au
+#*Audio configure_window huh.au
+#*Audio window_name bong.au
+#*Audio icon_name beep.au
+#*Audio res_class bong.au
+#*Audio res_name beep.au
+#*Audio end_windowlist twang.au
+
diff --git a/examples/system.twmrc-menu b/examples/system.twmrc-menu
new file mode 100644
index 0000000..8ab6c90
--- /dev/null
+++ b/examples/system.twmrc-menu
@@ -0,0 +1,104 @@
+#
+# $XConsortium: system.twmrc,v 1.8 91/04/23 21:10:58 gildea Exp $
+#
+# Default twm configuration file; needs to be kept small to conserve string
+# space in systems whose compilers don't handle medium-sized strings.
+#
+# Sites should tailor this file, providing any extra title buttons, menus, etc.
+# that may be appropriate for their environment. For example, if most of the
+# users were accustomed to uwm, the defaults could be set up not to decorate
+# any windows and to use meta-keys.
+#
+
+NoGrabServer
+RestartPreviousState
+DecorateTransients
+TitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
+ResizeFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
+MenuFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
+IconFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
+IconManagerFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*"
+#ClientBorderWidth
+
+Color
+{
+ BorderColor "slategrey"
+ DefaultBackground "maroon"
+ DefaultForeground "gray85"
+ TitleBackground "maroon"
+ TitleForeground "gray85"
+ MenuBackground "maroon"
+ MenuForeground "gray85"
+ MenuTitleBackground "gray70"
+ MenuTitleForeground "maroon"
+ IconBackground "maroon"
+ IconForeground "gray85"
+ IconBorderColor "gray85"
+ IconManagerBackground "maroon"
+ IconManagerForeground "gray85"
+}
+
+#
+# Define some useful functions for motion-based actions.
+#
+MoveDelta 3
+Function "move-or-lower" { f.move f.deltastop f.lower }
+Function "move-or-raise" { f.move f.deltastop f.raise }
+Function "move-or-iconify" { f.move f.deltastop f.iconify }
+
+#
+# Set some useful bindings. Sort of uwm-ish, sort of simple-button-ish
+#
+Button1 = : root : f.menu "/Debian"
+Button2 = : root : f.menu "defops"
+
+Button1 = m : window|icon : f.function "move-or-lower"
+Button2 = m : window|icon : f.iconify
+Button3 = m : window|icon : f.function "move-or-raise"
+
+Button1 = : title : f.function "move-or-raise"
+Button2 = : title : f.raiselower
+
+Button1 = : icon : f.function "move-or-iconify"
+Button2 = : icon : f.iconify
+
+Button1 = : iconmgr : f.iconify
+Button2 = : iconmgr : f.iconify
+
+#
+# And a menus with the usual things
+#
+menu "defops"
+{
+"Twm" f.title
+"Iconify" f.iconify
+"Resize" f.resize
+"Move" f.move
+"Raise" f.raise
+"Lower" f.lower
+"" f.nop
+"Focus" f.focus
+"Unfocus" f.unfocus
+"Show Iconmgr" f.showiconmgr
+"Hide Iconmgr" f.hideiconmgr
+"" f.nop
+"Kill" f.destroy
+"Delete" f.delete
+"" f.nop
+"Restart" f.restart
+"Exit" f.quit
+}
+
+include-menu-defs
+##
+## menu "/Debian
+## {
+## "Twm" f.title
+## "Xterm" f.exec "/usr/bin/X11/xterm &"
+## "SubMenu" f.menu "SubMenu"
+## }
+##
+## menu "SubMenu"
+## {
+## "Xv" f.exec "/usr/bin/X11/xv /home/joost/mens/joost/plaatje/nu/unknwn15.jpeg &"
+## }
diff --git a/examples/translate_menus b/examples/translate_menus
new file mode 100644
index 0000000..58400a7
--- /dev/null
+++ b/examples/translate_menus
@@ -0,0 +1,99 @@
+#There's:
+# translate: only translate for exact matches (RE "^$match\$"
+# subtranslate: translate for matches of RE "^$match"
+# substitute: substitute substrings: sed -s "/^$match/$repl/".
+# this only works for "substitute x->x", and
+# will give interesting results for " substitute x->y".
+#
+# Language translators: DO NOT USE THIS FILE! (see note on top of this file)
+#
+# Implement transitory menu layout for menu migration.
+#
+# Applications [was:Apps]
+# Amateur Radio [was:Hamradio]
+# Data Management [was:Databases]
+# Network [was:Net]
+# Science
+# Science/Electronics [was:Technical]
+# Science/Mathematics [was:Math]
+# System
+# System/Administration [was:Admin]
+# System/Language Environment [was:Language-Environment]
+# Terminal Emulators [was:XShells]
+# Games
+# Action [was:Arcade]
+# Blocks [was:Tetris-like]
+# Screen
+# Saving [was:Save]
+# Locking [was:Lock]
+# Window Managers [was:WindowManagers]
+# FVWM Modules [was:WindowManagers/Modules]
+
+# Applications
+
+translate section->section
+ Apps/Hamradio "Apps/Amateur Radio"
+endtranslate
+
+translate section->section
+ Apps/Databases "Apps/Data Management"
+endtranslate
+
+translate section->section
+ Apps/Net Apps/Network
+endtranslate
+
+translate section->section
+ Apps/Math Apps/Science/Mathematics
+endtranslate
+
+translate section->section
+ Apps/Technical Apps/Science/Electronics
+endtranslate
+
+translate section->section
+ Apps/System/Admin Apps/System/Administration
+endtranslate
+
+translate section->section
+ Apps/System/Language-Environment "Apps/System/Language Environment"
+endtranslate
+
+translate section->section
+ XShells "Apps/Terminal Emulators"
+endtranslate
+
+# Games
+
+translate section->section
+ Games/Arcade Games/Action
+endtranslate
+
+translate section->section
+ Games/Tetris-like Games/Blocks
+endtranslate
+
+# Screen
+
+translate section->section
+ Screen/Lock Screen/Locking
+endtranslate
+
+translate section->section
+ Screen/Save Screen/Saving
+endtranslate
+
+# Toplevels
+
+substitute section->section
+ Apps/ Applications/
+endtranslate
+
+translate section->section
+ WindowManagers/Modules "FVWM Modules"
+endtranslate
+
+translate section->section
+ WindowManagers "Window Managers"
+endtranslate
+
diff --git a/examples/twm b/examples/twm
new file mode 100755
index 0000000..f12f29f
--- /dev/null
+++ b/examples/twm
@@ -0,0 +1,34 @@
+#!/usr/bin/install-menu
+# -*- mode: shell-script; -*-
+#I need menu-1!
+#
+#NOTE: the first line of this script _must_ be
+# equal to "#!/usr/bin/install-menu", otherwise update-menus
+# will feed this script old-compat-mode data.
+#
+#More info: /usr/share/doc/menu/html.
+#
+compat="menu-1"
+
+!include menu.h
+
+compat="menu-2"
+
+function f($com)=" \"" title() "\" f.exec \""$com " &\"\n";
+
+#This doens't seem to be possible with twm: wm="f.restart \"${title}\"\\n"
+supported;
+ x11= f($command);
+ text=f(esc(term(),"\""));
+# x11 = " \"" $title "\" f.exec \""$command " &\"\n";
+# text= " \"" $title "\" f.exec \"xterm -title \\\""
+# $title "\\\" -e " esc($command,"\"") " &\"\n";
+endsupported;
+startmenu= "menu \"" $section "\"\n{\n";
+endmenu= "}\n";
+submenutitle=" \"" title() "\" f.menu \"" $section "\"\n";
+genmenu= "menudefs.hook";
+rcfile= "system.twmrc";
+examplercfile="system.twmrc-menu";
+rootprefix= "/etc/X11/twm/";
+userprefix= "/.twm/";