Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xbiff++(1) — Dell System V Release 4 Issue 2.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

X(1)

xrdb(1)

stat(2)



XBIFF++(1)                  X Version 11(Release 4)                  XBIFF++(1)


NAME
      xbiff++ - mailbox flag for X, with faces and sounds

SYNOPSIS
      xbiff++ [-toolkitoption ...] [-option ...]

DESCRIPTION
      The xbiff++ program displays a little image of a mailbox.  When there is
      no new mail, the flag on the mailbox is down.  When mail arrives, the
      flag goes up and the mailbox beeps (or optionally plays a sound on the
      Sun SPARCstation).  It is also possible to have a different image
      displayed depending on who the mail is from (a picture of their face, for
      example.)  New mail is defined as messages without a "Status:" line in
      the message header.  By default, pressing the left mouse button in the
      image forces xbiff++ to remember the current size of the mail file as
      being the ``empty'' size and to lower the flag. Pressing the right button
      causes xbiff++ to review all new mail (and play any sounds which are
      appropriate).

      This program is nothing more than a wrapper around an enhanced Athena
      Mailbox widget.

OPTIONS
      Xbiff++ accepts all of the standard X Toolkit command line options along
      with the additional options listed below:

      -help   This option indicates that a brief summary of the allowed options
              should be printed on the standard error.

      -update seconds
              This option specifies the frequency in seconds at which xbiff++
              should update its display.  If the mailbox is obscured and then
              exposed, it will be updated immediately.  The default is 60
              seconds.

      -file filename
              This option specifies the name of the file which should be
              monitored.  By default, it watches /usr/spool/mail/username,
              where username is your login name.

      -shape  This option indicates that the mailbox window should be shaped if
              masks for the empty or full images are given.

      -sound filename
              This option specifies a sound to be played when new mail arrives
              and the message header doesn't match one of the given bindings.
              (Note: sounds other than a simple beep only work Sun
              SPARCstations.)

      -noMailSound filename
              This option specifies a sound to be played when reviewing new
              mail and none has arrived.


10/89                                                                    Page 1







XBIFF++(1)                  X Version 11(Release 4)                  XBIFF++(1)


      -soundBindings binding-list
              This option specifies sounds to be played for new messages whose
              headers match the given patterns. See the following description
              of the soundBindings and faceBindings resources for the format of
              the binding-list.  (Note: sounds other than a simple beep only
              work Sun SPARCstations.)

      -faceBindings binding-list
              This option specifies the bitmaps or pixmaps to be shown for new
              messages whose headers match the given patterns. See the
              following description of the soundBindings and faceBindings
              resources for the format of the binding-list.

      -volume percentage
              This option specifies how loud the bell should be rung or a sound
              should be played when new mail comes in.

      -autoResize
              This option says that the xbiff++ window should automatically be
              resized to be the same size as the bitmap it is currently
              displaying.  -noAutoResize The inverse of the -autoResize option.

      The following standard X Toolkit command line arguments are commonly used
      with xbiff++:

      -display display
              This option specifies the X server to contact.

      -geometry geometry
              This option specifies the prefered size and position of the
              mailbox window.  The mailbox is 48 pixels wide and 48 pixels high
              and will be centered in the window.

      -bg color
              This option specifies the color to use for the background of the
              window. The default is ``white.''  This only applies when
              displaying a bitmap, not a color GIF file.

      -bd color
              This option specifies the color to use for the border of the
              window.  The default is ``black.''

      -bw number
              This option specifies the width in pixels of the border
              surrounding the window.

      -fg color
              This option specifies the color to use for the foreground of the
              window.  The default is ``black.''  This only applies when
              displaying a bitmap, not a color GIF file.




Page 2                                                                    10/89







XBIFF++(1)                  X Version 11(Release 4)                  XBIFF++(1)


      -rv     This option indicates that reverse video should be simulated by
              swapping the foreground and background colors.  This only applies
              when displaying a bitmap, not a color GIF file.

      -xrm resourcestring
              This option specifies a resource string to be used.  This is
              especially useful for setting resources that do not have separate
              command line options.

X DEFAULTS
      This program uses the Mailbox widget in the X Toolkit.  It understands
      all of the core resource names and classes as well as:

      file (class File)
              Specifies the name of the file to monitor.  The default is to
              watch /usr/spool/mail/username, where username is your login
              name.

      checkCommand (class CheckCommand)
              Specifies a shell command to be executed to check for new mail
              rather than scanning file for new messages.  The specified string
              value is used as the argument to a system(3) call and may
              therefore contain i/o redirection.  The exit status of the
              command should indicate the number of unread messages pending.

              This can be pretty useful; with an appropriate shell script, this
              can be used to make xbiff++ tell you things like, for example,
              when all of your jobs have left the print queue, or when a
              particular user logs on.

      onceOnly (class Boolean)
              Specifies that the bell is only rung the first time new mail is
              found and is not rung again until at least one interval has
              passed with no mail waiting.  The window will continue to
              indicate the presence of new mail until it has been retrieved.

      width (class Width)
              Specifies the default width of the mailbox.

      height (class Height)
              Specifies the default height of the mailbox.

      update (class Interval)
              Specifies the frequency in seconds at which the mail should be
              checked.

      sound (class Sound)
              Specifies the sound to be played for each new message which
              doesn't match one of the current sound bindings (see the
              soundBindings resource). The value should be the name of the file
              for the sound.



10/89                                                                    Page 3







XBIFF++(1)                  X Version 11(Release 4)                  XBIFF++(1)


      noMailSound (class NoMailSound)
              Specifies the sound to be played when reviewing new mail and no
              new mail has arrived.  The value should be the name of the file
              for the sound.

      useLED (class Boolean)
              If true, then when there is new mail in your inbox, one of the
              keyboard LEDs will be lit up.  That LED will be off when there is
              no new mail.  whichLED (class Integer) If useLED is true, then
              this is the number of the LED to use.

      soundBindings (class SoundBindings)
              Specifies bindings of specific sound files to patterns which are
              matched to lines in the headers of new messages. Currently only
              the "From:", "Cc:", "To:", and "Subject:" lines are matched. The
              value of this resource is a string which is a comma separated
              list of bindings.  Each binding is a pattern-sound pair,
              separated by a vertical bar ("|"). An example binding string is:
                 "To:.*SunUsers|/usr/sounds/Flourish6.au,From:.*root|/usr/sounds/evil.au."
              Note that a "." is used before a wildcard "*". This is required
              since the regular expression package used defines "*" to mean
              zero or more occurences of the previous regular expression.

      faceBindings (class FaceBindings)
              Specifies bindings of specific bitmap or GIF files to patterns
              which are matched to lines in the headers of new messages.  This
              is identical in format to the soundBindings resource.  Only the
              file corresponding to the first regexp which matches the message
              will be shown, so put the expressions which you wish to be
              favored earlier in your bindings.  For example, if you want a
              bitmap to be shown for a particular user, and another bitmap to
              be shown for mail to a particular mailing list of which you are a
              memeber, decide which of the two bitmaps you want to see when
              both are true, and place that pattern earlier in your file.

              ****** The following paragraph is a lie, it doesn't work yet.
              ******

              (If you have a color monitor, you may use color images for this.
              These images should be in the GIF format.  This is a fairly
              common format, and many programs exist for converting other
              formats to it, notably Jef Poskanzer's PBM toolkit, available
              from your favorite comp.sources.misc archive site.)

              As with many other applications, the directories listed in the
              *BitmapFilePath resource will be searched for files when the file
              name is not fully qualified.  This resource is a string of
              colon-seperated directories, just like the PATH environment
              variable.





Page 4                                                                    10/89







XBIFF++(1)                  X Version 11(Release 4)                  XBIFF++(1)


      caseSensitive (class CaseSensitive)
              Specifies whether the pattern matching of the soundBindings and
              faceBindings against the message headers should consider the case
              of characters.  The default is ``true'' (which is probably a bad
              default).

      volume (class Volume)
              Specifies how loud the bell should be rung or a sound should be
              played.  The default is 50 percent.

      foreground (class Foreground)
              Specifies the color for the foreground.  The default is ``black''
              since the core default for background is ``white.''  This does
              not apply when a color image is being displayed.

      reverseVideo (class ReverseVideo)
              Specifies that the foreground and background should be reversed.
              This doesn't apply when a color image is being displayed.

      flip (class Flip)
              Specifies whether or not the image that is shown when mail has
              arrived should be inverted.  The default is ``true.''  This only
              applies to the fullPixmap - if a bitmap from the faceBindings is
              displayed, it will never be inverted.

      fullPixmap (class Pixmap)
              Specifies a bitmap to be shown when new mail has arrived; this
              bitmap is used only if the most recent new mail does not match a
              pattern in the faceBindings resource.  If you are using
              faceBindings, this is effectively the ``unknown sender'' bitmap.

      emptyPixmap (class Pixmap)
              Specifies a bitmap to be shown when no new mail is present.

      shapeWindow (class ShapeWindow)
              Specifies whether or not the mailbox window should be shaped to
              the given fullPixmapMask and emptyPixmapMask.  This has no effect
              on bitmaps selected with faceBindings, as there is no way to
              specify a mask along with a faceBinding.

      fullPixmapMask (class PixmapMask)
              Specifies a mask for the bitmap to be shown when new mail has
              arrived.  This is used only when the fullPixmap is being shown,
              not when a bitmap from the faceBindings is being shown.  If the
              fullPixmap is a color image, this should still be a bitmap of hte
              appropriate shape.

      emptyPixmapMask (class PixmapMask)
              Specifies a mask for the bitmap to be shown when no new mail is
              present.




10/89                                                                    Page 5







XBIFF++(1)                  X Version 11(Release 4)                  XBIFF++(1)


      autoResize (class Boolean)
              If true, the xbiff++ window will automatically be resized to be
              the same size as the bitmap it is displaying.

ACTIONS
      The Mailbox widget provides the following actions for use in event
      translations:

      check() This action causes the widget to check for new mail and display
              the flag appropriately.

      unset() This action causes the widget to lower the flag until new mail
              comes in.

      set()   This action causes the widget to raise the flag until the user
              resets it.

      review()
              This action causes the widget to review all unread messages. This
              includes playing sounds for these messages.

      The default translation is

              <Btn1Down>:  unset()
              <Btn3Down>:  review()


ENVIRONMENT
      DISPLAY to get the default host and display number.

      XENVIRONMENT
              to get the name of a resource file that overrides the global
              resources stored in the RESOURCE_MANAGER property.

SEE ALSO
      X(1), xrdb(1), stat(2)

BUGS
      Color images (GIF files) don't work at all yet.  Someone please fix this.

      Since the X protocol has nothing to say about sound, this program is
      unable to play sound files unless it is being run on the primary console
      display of a Sun SPARCstation.  If it is being run on another machine, or
      if it is being run on a display which is not the same as localhost:0, it
      will use the pathetically simple default X beep.

      There should be a search-path for sound-bindings analagous to
      *BitmapFilePath.

      It should be possible to specify a volume for each sound, instead of all
      sounds being played at the same volume.  soundBindings should be able to
      contain something like "to:.*pattern|/a/b/c/soundfile.au(65)" to play the


Page 6                                                                    10/89







XBIFF++(1)                  X Version 11(Release 4)                  XBIFF++(1)


      specified file at 65 percent.  This number should be multiplied against
      the global volume parameter.

      Since the soundBindings and faceBindings resources use "|" to separate
      the patterns and values, there is no way to use the regexp meaning of
      "|".

      When more than one message is in the mailbox before xbiff++ is started,
      and when more than one message is in the mailbox when the user clicks
      right to rescan, the face corresponding to the first message is shown
      instead of the face corresponding to the last one.

      We should handle compressed .xbm files (compressed GIF files are handled,
      or will be once the GIF displayer works.)

      We should support the USENIX Face Saver file format, possibly others.

      It would be nice if there was an option to have it display a count of how
      many messages are in the mailbox, perhaps in the name of the window, so
      that it could be shown in a titlebar.

      The checkCommand could be more useful: xbiff should run it with popen()
      and parse its output, so that a script can be crafted to show the face of
      the user whose job is at the front of the print queue, or the user
      consuming the most cpu.

      It would be nice if the Review command would display a face for each
      message, side by side (so that the entire contents of the mailbox could
      be seen at once.)


COPYRIGHT
      Copyright 1988, Massachusetts Institute of Technology.
      See X(1) for a full statement of rights and permissions.

AUTHOR
      Jim Fulton, MIT X Consortium
      Additional hacks by Ralph Swick, DEC/MIT Project Athena
      Sound hacks by Mike Wagner, Siemens Corporate Research
      <wagner@cadillac.siemens.com>.
      Face and color hacks by Jamie Zawinski <jwz@lucid.com>.
      Regular expression package from Henry Spencer.
      SPARCstation sound playing by Jef Poskanzer with SunOS 4.1 patches from
      Greg Earle.
      GIF reader by Davor Matic and Thomas Wu, extracted from the xshow
      program.








10/89                                                                    Page 7





Typewritten Software • bear@typewritten.org • Edmonds, WA 98026