User-specific configuration file for groffer, where denotes the
user's home directory. This script is called after the system-wide
configuration file to enable overriding by the user. Their lines
either start with a minus character or are shell commands.
Arbitrary spaces are allowed at the beginning, they are just
ignored. The lines with the beginning minus are appended to the
existing value of $GROFFER_OPT. This easily allows to set general
groffer options that are used with any call of
groffer. After the transformation of the minus lines the
emerging shell scripts that are called by groffer using the
` filename' syntax. The only option that needs a minus line
in the configuration files is [t_long shell] The reason is that its
argument must be called at a very early stage before the whole
syntax of the configuration can be transformed. It makes sense to
use these configuration files for the following tasks: Preset
command line options by writing them into lines starting with a
minus sign. Preset environment variables recognized by groffer.
Write a function for calling a viewer program for a special
mode and feed this name into its corresponding [t_long
I]mode]-viewer] option. Note that the name of such a function must
coincide with some existing program in the system path in order to
be recognized by groffer. As an example, consider the following
configuration file in ~/.groff/groffer.conf, say.
# groffer configuration file
#
# groffer options that are used in each call of groffer
--shell=/bin/bash
--resolution=100
--foreground=DarkBlue
--x-viewer='gxditview -geometry 850x800'
#
# some shell commands
if test "$DISPLAY" = ""; then
DISPLAY='localhost:0.0'
fi
date >>~/mygroffer.log
This configuration sets four groffer options and runs two
shell commands. This has the following effects: Lines starting with
a # character are Use /bin/bash as the shell to run
the groffer script. Take a resolution of 100 dpi and
a text color of DarkBlue in all viewers that support this.
Force gxditview(1)
as the X-mode viewer using the geometry option for setting the
width to 850 dpi and the height to 800 dpi.
The variable is set to localhost:0.0 which allows to start
groffer in the standard X display, even when the program is
called from a text console. Just for fun, the date of each
groffer start is written to the file mygroffer.log in
the home directory.