User-specific configuration file for
groffer,
where
denotes the user's home directory.
This file is called after the system-wide configuration file to enable
overriding by the user.
Both files are handled for the configuration, but the configuration
file in
comes first; it is overwritten by the configuration file in the home
directory; both configuration files are overwritten by the environment
variable
everything is overwritten by the command line arguments.
In the configuration files, arbitrary spaces are allowed at the
beginning of each line, they are just ignored.
Apart from that, the lines of the configuration lines either start
with a minus character, all other lines are interpreted as shell
commands.
The lines with the beginning minus are interpreted as
groffer
options.
This easily allows to set general
groffer
options that should be used with any call of
groffer.
If a lines starts with a double minus it represents a
groffer
long option; everything behind the first equal sign
`='
or space character up to the end of the line is interpreted as its
argument.
A line starting with a single minus represents a short options cluster
with or without a final argument.
It is not necessary to use quotes in these lines; quotes are just
ignored.
The lines starting with a minus are changed into a prepend to the
existing value of
So the configuration files will be transferred into a shell script
that is called within
groffer.
It makes sense to use these configuration files for the following
tasks:
Preset command line options, such as choosing a
mode
or a viewer.
These are written into lines starting with a single or double minus
sign, followed by the option name.
Preset environment variables recognized by
groffer;
but do not forget to export them.
You can also write a shell function for calling, for example a viewer
program for some
mode.
Such a function can be fed into a corresponding
[t_long I]mode-viewer]
option.
Enter
[t_long shell]
to specify a shell for the run of
Some shells run much faster than the standard shell.
As an example, consider the following configuration file in
say.
# groffer configuration file
#
# groffer options that are used in each call of groffer
--shell=ksh
--foreground=DarkBlue
--resolution=100
--x-viewer=gxditview -geometry 900x1200
#
# some shell commands
if test "$DISPLAY" = ""; then
export DISPLAY='localhost:0.0'
fi
date >>~/mygroffer.log
The lines starting with
#
are command lines.
This configuration sets four
groffer
options (the lines starting with `-') and runs two shell commands (the
rest of the script).
This has the following effects:
Use
ksh
as the shell to run the
groffer
script; if it works it should be faster than the usual
sh.
Use a text color of
DarkBlue
in all viewers that support this, such as
gxditview.
Use a resolution of
100~dpi
in all viewers that support this, such as
gxditview.
By this, the default device in
x mode
is set to
X100.
Force
gxditview(1)
as the
x-mode
viewer using the geometry option for setting the width to
900~dpi
and the height to
1200~dpi.
This geometry is suitable for a resolution of
100~dpi.
If the environment variable
is empty set it to
localhost:0.0.
That allows to start
groffer
in the standard CR]X~Window 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
in the home directory.