I think it would be a useful thing if fvwm could support installable
packages. A package would be a set of related files needed to
configure fvwm in some special way.
What I have in mind is to add a new command in fvwm's configuration
file syntax:
AddPackage Name [Preprocessor command]
name is the name of a directory somewhere in the current
ModulePath. The command interpreter adds this directory to
the current ModulePath, PixmapPath, and IconPath. This
directory must have a "package.rc" file within it that may
contain fvwm configuration commands.
The preprocessor command, if specified, would be some program
that would be used to preprocess the package.rc file. FvwmM4
and FvwmCpp come to mind here. If not specified, the
package.rc file is read directly by the command interpreter.
By convention, the package.rc file only defines menus,
functions, and module configurations, all prefixed wherever
possible by the package directory name. Also, by convention,
a function named Init (prefixed by the packagethe name) is
used to "implement" the package.
The files within the package directory could contain whatever
is necessary to implement the package... module executables,
pixmaps, bitmaps, etc.
As an example, let's create a Windows 95 look and feel package. To do
this, we would need five files: three pixmap files (for the minimize,
maximize, and close buttons), a README file (to explain what the
package is for, and to explain how to install it) and a package.rc
file. I won't include the contents of the pixmap files, but show how
the package would be specified:
- File: Win95/README
Win95 Example Package
This package implements a Windows 95 look and feel for fvwm.
Installation:
This assumes that you have installed this package as
/usr/lib/X11/fvwm/Win95. First, make sure that
/usr/lib/X11/fvwm is in your ModulePath:
ModulePath /usr/lib/X11/fvwm
Then, to have fvwm use the Windows 95 look and feel, add the
following two lines to the bottom of our .fvwm2rc file:
AddPackage Win95
Win95Init
- File: Win95/package.rc:
# Win95 Look and Feel package:
DestroyDecor Win95
AddToDecor Win95
+ WindowFont -adobe-helvetica-bold-r-normal--12-120-75-75-p-*-iso8859-1
+ TitleStyle LeftJustified
+ TitleStyle ActiveUp (Solid Navy -- flat) \
ActiveDown (Solid Navy -- flat) \
Inactive (Solid grey51 -- flat)
+ ButtonStyle 1 MiniIcon -- Flat
+ ButtonStyle 2 Pixmap win95-close-full.xpm
+ ButtonStyle 4 Pixmap win95-maximize-full.xpm
+ ButtonStyle 6 Pixmap win95-minimize-full.xpm
+ BorderStyle Active -- HiddenHandles NoInset
+ BorderStyle Inactive -- HiddenHandles NoInset
+ HilightColor white grey60
+ ButtonStyle 1 - Clear MWMDecorMenu
+ ButtonStyle 2 - Clear
+ ButtonStyle 4 - Clear MWMDecorMax
+ ButtonStyle 6 - Clear MWMDecorMin
+ ButtonStyle All -- UseTitleStyle
+ ButtonStyle right ActiveUp (-- Flat) \
ActiveDown (-- Raised) \
Inactive (-- Flat)
DestroyFunc Win95Init
AddToFunc Win95Init \
"I" RemoveAllButtons
+ "I" Style "*" UseDecor Win95, ForeColor Black
+ "I" Style "*" Button 1, Button 2, Button 4, Button 6
+ "I" Style "*" NoButton 0, NoButton 3, NoButton 5, \
NoButton 7, NoButton 8, NoButton 9
+ "I" MenuStyle Black grey75 grey40 -adobe-helvetica-medium-r-*-120-* mwm
+ "I" Mouse 0 1 N Menu Window-Ops Close
+ "I" Mouse 0 2 N Close
+ "I" Mouse 0 4 N Maximize 100 97
+ "I" Mouse 0 6 N Iconify
+ "I" Mouse 3 6 N Replace
+ "I" Exec xsetroot -solid cyan4
+ "I" Recapture
- File: Win95/Win95-close-full.xpm
[ data not included in this message ]
- File: Win95/Win95-maximize-full.xpm
[ data not included in this message ]
- File: Win95/Win95-minimize-full.xpm
[ data not included in this message ]
This package directory should be stored somewhere within the
ModulePath (or we could also create a 'PackagePath' keyword for this
purpose!), and it could be read by the command:
AddPackage Win95
To get the Windows 95 look and feel, one simply needs to execute the
package's initialization function:
Win95Init
(This could be anywhere where an fvwm function could be executed... in
the main RC file, or within a menu, for example.)
Since the package is defined to be an entire directory, the package
could be simply distributed as a gzip'ed tar file. People that want
to tinker with the package will know exactly where to go to find the
file(s) to change.
Packages aren't limited to look and feel issues... they could be used
to specify some neat FvwmButtons configuration, some common menus,
etc. People could then pick and choose the packages that they want on
their systems.
Fvwm could contain some packages in its distribution to supply
examples of how packages could be implemented. We could also maintain
a repository for other FVWM packages.
Using the Win95 package that I have just outlined, an answer to a FAQ
(How do I get fvwm to look like Win95?) could be answered easily
(download the package
http://some.site/fvwm/packages/win95.tar.gz and
follow the README file within it).
What do people think of this idea?
--
(void) lar3ry(); gensch_at_zk3.dec.com
"Sometimes it happens. People just explode. Natural causes."
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Wed May 20 1998 - 10:19:22 BST