[1316] in linux-announce channel archive

home help back first fref pref prev next nref lref last post

mfm 1.2

daemon@ATHENA.MIT.EDU (Lars Wirzenius)
Wed Nov 22 18:15:09 1995

Date: Wed, 22 Nov 1995 23:01:05 +0200
From: Lars Wirzenius <wirzeniu@cc.helsinki.fi>
To: linux-announce@vger.rutgers.edu

From: renalds@abn_dev.abn.com (Andrew Renalds)
Subject: mfm 1.2
Organization: ABN-AMRO
Keywords: desktop
Approved: linux-announce@news.ornl.gov (Lars Wirzenius)
Newsgroups: comp.os.linux.announce
Followup-to: comp.os.linux.x

-----BEGIN PGP SIGNED MESSAGE-----

The 1.2 version of mfm is now available at:

	ftp.x.org:contrib/desktop_managers/mfm1.2.tar.Z

and all mirror sites.  The README is below.

*********************************************************************

        *** MFM 1.2 ***
        --------------------

        Written by Andrew T. Renalds - renalds@abn.com


MFM is an OSF/Motif-based filemanager in every sense.  It allows complete
graphical manipulation of UNIX filesystems as well the ability to launch
applications.  The design is similar in nature to the NeXT filemanager
but also offers more functionality.  Other applications can also be adapted
to accept files from MFM via Motif 1.2 drag and drop.  Other features include:

- - A clipboard so that frequently used applications, files, and directories can 
  be easily accessed  
- - A devices panel has been added to this version for user-configureable
  support for multiple devices such as printers, tape drives, etc...


Compiling
- ---------

If you have "xmkmf",

1.  Edit "config.h" to turn on/off options.
2.  Type "xmkmf -a" to create all makefiles in all subdirectories.  
3.  Type "make" to build the "mfm" executable.
4.  Configure the application defaults file (see below).  The file
    "Mfm.color.sample.ad" will be used if HAVE_XPMLIB is defined; 
    otherwise "Mfm.bw.sample.ad" is used.
5.  Type "make install" to install the executable, application defaults 
    file, and bitmaps.

If you do not have "xmkmf",

1.  Type "cp Makefile.std Makefile" to insure you have a backup copy.
2.  Modify the "Makefile" for your system.
3.  Type "make" to build the "mfm" executable.
4.  Configure the appropriate application defaults file (see below).
5.  Type "make install" to install the executable, application defaults 
    file, and bitmaps.  You will not need to modify any of the makefiles 
    in the subdirectories since the settings are passed to them.

*** Important:  MFM will not compile if you do not have at least Motif 1.2.0.


Application Defaults File
- -------------------------

In addition to the usual attributes that can be set such as colors and fonts,
MFM defines several others.  They are primarily rules which govern the operation
of the application.  These rules may contain certain variables which MFM will
substitute for the appropriate value.  They are:

  "$PATH+FILENAME" - the complete filename including path, i.e., /usr/renalds/.cshrc
  "$FILENAME"      - the filename excluding path, i.e., .cshrc
  "$PATH"          - the path of the file only, i.e., /usr/renalds
  "$EDITOR"        - the environment variable EDITOR
  "$ALL"           - in cases where multiple files are dropped on a device, the
                     appropriate operation can be performed once with all of the
                     files, i.e. "lp $ALL", or multiple times, i.e. "lp $PATH+FILENAME"

Like translations, each rule is specified on a separate line ending with "\n\".  The 
resources defined by MFM are:

I.  defaultLaunchCommand

        This defines the command that is used if no other rule applies.

        Example:  mfm*defaultLaunchCommand:  $EDITOR $PATH+FILENAME

II.  rules

These rules dictate not only the pixmaps to be used for certain types of files but
also the command that is to be executed when a user double-clicks on it.  The type 
of rule is indicated by a keyword and comes first on a line.  There are six rule
types.  They are:

  1.  FILENAME
        This associates a pixmap with a particular filename.  The directory
        which this file is in is irrelevent.  The rule syntax is:

        FILENAME  pixmap_filename  particular_filename

        Example:  FILENAME  core.xpm   core
                  FILENAME  xterm.xpm  xterm

  2.  FILE+COMM
        This associates a pixmap and a command with a particular filename.
        The directory which this file is in is irrelevent.  The given command
        will be executed (launched) for a file with the given name.  The 
        rule syntax is:

        FILE+COMM  pixmap_filename  particular_filename  command

        Example:  FILE+COMM  makefile.xpm  Makefile  "cd $PATH; make"
                  FILE+COMM  makefile.xpm  makefile  "cd $PATH; make"

  3.  EXTENSION
        This associates a pixmap with a particular file extension.  The rule
        syntax is:

        EXTENSION  pixmap_filename  file_extension

        Example:  EXTENSION  compressed.xbm  .Z
                  EXTENSION  library.xbm     .a
                  EXTENSION  tar.xpm         .tar

  4.  EXT+COMMAND
        This associates a pixmap and a command with a particular file extension.
        This means that the given command will be executed (launched) for a 
        file with the given extension.  The rule syntax is:

        EXT+COMMAND  pixmap_filename  file_extension  command

        Example:  EXT+COMMAND  xbm.xbm         .xbm  "pixmap $PATH+FILENAME"
                  EXT+COMMAND  dot_c.xbm       .c    "$EDITOR $PATH+FILENAME"
                  EXT+COMMAND  dot_c.xpm       .C    "$EDITOR $PATH+FILENAME"
                  EXT+COMMAND  dot_h.xpm       .h    "$EDITOR $PATH+FILENAME"
                  EXT+COMMAND  dot_h.xbm       .H    "$EDITOR $PATH+FILENAME"
                  EXT+COMMAND  postscript.xbm  .ps   "ghostview $PATH+FILENAME"

  5.  FILESTRING
        This associates a pixmap with the string returned from the Unix 'file'
        command.  These are listed in the /etc/magic file.  This allows you to
        associate pixmaps with file types.  The rule syntax is:

        FILESTRING  pixmap_filename  magic_string

        Example:  FILESTRING  compressed.xbm  "compressed data"
                  FILESTRING  library.xpm     "archive random library"

  6.  FILESTR+COMM
        This associates a pixmap and a command with the string returned from
        the Unix 'file' command.  These are listed in the /etc/magic file.
        This allows you to associate pixmaps and commands with file types.
        The rule syntax is:

        FILESTR+COMM  pixmap_filename  magic_string  command

        Example:  FILESTR+COMM  postscript.xpm  "PostScript document"      "ghostview $PATH+FILENAME"
                  FILESTR+COMM  dot_c.xbm       "c program text"           "emacs $PATH+FILENAME"
                  FILESTR+COMM  sh.xbm          "executable shell script"  "$PATH+FILENAME"

III. devices

Since each flavor of Unix has its own way of specifying a list of available
devices, I decided to let the user configure a devices panel.  Files can be dropped
onto the devices and the specified command will be executed.  The rule syntax is:

        device_name_label  pixmap_filename  command

        Example:  laser1  PRINTER  "lp $ALL"
                  tape1   TAPES    "tar -xvf /dev/tape1 $ALL"
                  floppy1 FLOPPY   "tar -xvf /dev/floppy1 $ALL"

MFM defines three default pixmaps named PRINTER, FLOPPY, and TAPES which can be
used instead of trying to dig one up.  This panel is generic enough to be used for
many other purposes as well.  For example, "libmyLib.a library.xpm "ar rv $ALL" is a
perfectly valid rule for archiving object files into a library.  In fact, it can 
be used to apply a command to any file.

Pixmaps And Bitmaps
- -------------------

MFM uses XmGetPixmap() to load pixmaps.  If the HAVE_XPMLIB macro is defined, it 
will also attempt to load pixmaps via XpmReadFileToPixmap().  Future versions will be 
able to accept GIF, TIFF, and other formats.  Collections of bitmaps and pixmaps
are available.  Two worth mentioning from ftp.x.org are R5contrib/AIcons and
R5contrib/hobbes-icons-xpm3.tar.gz.  These can be used to customize your own
setup.  I use 48x48 size and would HIGHLY recommend you do the same.  You can 
use your pixmap/bitmap builder to "rescale" your favorite ones.  I have included
some default bitmaps and pixmaps.

In this version, I put the rules into an application defaults file which allows
an easier way for the user to override the system defaults.  I still need to provide
a graphical interface to create and modify these files in a future version.

Commands get launched via your shell so full pathnames are not necessary if your 
PATH variable is set to include the directory where the executable is located.  



- -- 

- ----------------------------------------------------------------------
Andrew T. Renalds				email: renalds@abn.com
ABN AMRO Bank, NV				voice: (312) 904-5096
Capital Markets / Treasury Services		fax:   (312) 904-5774
181 West Madison Avenue, # 1705
Chicago IL 60602
- ----------------------------------------------------------------------



-----BEGIN PGP SIGNATURE-----
Version: 2.6.2i

iQCVAwUBMLONiYQRll5MupLRAQGAdgP+MdiXfBHXijbq0xezsFH1JGpbO9um8oCF
x/+dNKkJUfOpd1g3liFm0xpUGXbT1+wyuCvgEJCxg7aPx7KemZRsGeqc8vgDQ/pA
Gjsnvi7Fnk1tP4vWkALNSWyvV89dYZcrX8OzrHQLPMazoWIkgDdL642Tk70bC99L
buFlevjG5Y0=
=bnOE
-----END PGP SIGNATURE-----

-- 
This article has been digitally signed by the moderator, using PGP.
Finger wirzeniu@kruuna.helsinki.fi for PGP key needed for validating signature.
Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov
PLEASE remember a short description of the software and the LOCATION.


home help back first fref pref prev next nref lref last post