The definition for the generated signatures is contained entirely within the .signify file contained in
the user's home directory. Any completely empty lines (lines with even a single space are considered
part of the signature data) and those lines starting with a hash character (#) are completely ignored.
Those lines starting with a percent sign (%) are considered commands and affect the way Signify behaves.
PerlCommandSubstitutionSignify can execute an arbitrary perl code fragment during the initial reading of the configuration file.
This can be used, for example, to choose values or text depending on the environment in which Signify is
being run. To use this feature, simply enclose the desired perl code in back-tics (i.e. `perl code`).
Whatever the perl code evaluates to will be substituted in that spot. No further variable substitutions
are made on the resulting text. Signify is intelligent enough to recognize two back-tics together (often
used as a better looking quotation mark) as not being a code fragment. Thus, writing something like
"``Stop,'' she said." will appear as expected. Note: The entire code fragment must be contained on a
single line of the input file.
DefiningVariablesSignify will substitute variables within each line of the signature in much the same way as the shell
would. Any sequence of $WORD; will be replaced by the value corresponding to the name "WORD". Case is
significant but the trailing semicolon may be omitted if the next character is not a letter, digit, or
underscore. By default, these variables look up values inside the environment variables, but can also be
defined or redefined within the .signify file itself with a command such as:
% $email=myid@mycompany.com
Everything after the equal sign (=) is considered part of the value. Variables can be used in the
definition of other variables. As a special case, $$ will evaluate to a single dollar sign ($).
The special variable SIGWIDTH can be used to set the desired output width of the generated signature. By
default, this variable has the value "79". There is also a BLANK variable you can place on a line to
create a totally empty line when the signature is output.
IncludingOtherFiles
You can tell Signify to read another file in place of the current line with a command like:
% include $HOME/.signify-quotes
For convienence, you can use a tilde (~) instead of $HOME to read a file relative to your home directory.
CreatingAlternates
An unlimited number of "alternates" can be specified by using the "{", "|", and "}" commands. When the
signature is generated, only one of all the possible alternates will be output. For example:
% {
This is the first possibility.
% |
This is the second possibility.
% |
This is the third (and last) possibility.
Note that alternatives can span multiple lines.
% }
CreatingColumnsSignify will automatically create side-by-side columns with nice, even spacing by using the "(", "|", and
")" commands. When output, everything will be padded out with spaces to fit nicely on the line. For
example:
% (
This is the
first column.
% |
This is the second.
% |
This is the third
(and last) column.
% )
NestingSections
Alternates and columns can be nested to any depth, though this can quickly become unwieldy and may not
work exactly as expected, especially with columns. As a general rule, only supply alignment options (eg.
"center", "right") at the most outside level to do any text formatting. For example, if supplying
multiple "alternates" within a column, put the alignment options on the column and not on the alternates.
SectionCommandOptions
The "alternates" and "columns" commands can take options to alter how they behave. The following is a
list of supported options and what they do, though not all have meaning for both types of section.
Multiple options can be specified by separating them with a comma (,).
bottom push the following lines of text to the bottom of a column should it have fewer lines than the
longest column. This option has no meaning to "alternates" sections.
center adjust the following lines to be centered on the page or in the column. When used in an
"alternates" section, an additional "=<number>" can be used to specify what column to center
around instead of the middle of the page.
exec treat the following lines not as text to be included in the column or alternate, but as commands
to be executed by the shell. For each command executed, if its return status is 0 then the output
it produced is included at that point, otherwise the output is discarded. Any included text is
then aligned, etc. as usual. This command is most useful for inserting random quotes generated by
programs such as fortune(6).
left adjust the following lines so they sit at the left margin. This is the default horizontal
alignment and most closely reflects how the lines are entered into the .signify file itself. Note
that pad spaces will still be placed on both sides of a column with this type of alignment unless
the minwidth option is also specified.
minwidth
do not pad the left and right sides of this column when placing next to other columns. This is
useful for building column separator lines and the like that are not really part of the content.
This option has no meaning to "alternates" sections.
repeat output the following lines multiple times to fill all lines in the column. This is useful for
building column separator lines and the like that are just a repeated sequence. A multi-line
sequence can be specified and only those lines necessary to fill the column will be output. The
entire sequence will be output in its entirety at least once, however. This option has no meaning
to "alternates" sections.
right adjust the following lines so they sit at the right margin. Note that pad spaces will still be
placed on both sides of a column with this type of alignment unless the minwidth option is also
specified.
top push the following lines of text to the top of a column should it have fewer lines than the
longest column. This is the default action if no vertical centering is specified. This option
has no meaning to "alternates" sections.
vcenter
push the following lines of text in the vertical center of a column should it have fewer lines
than the longest column. This option has no meaning to "alternates" sections.
weight=<number>
change the likelihood a given alternate will be chosen. The chance of any specific alternate
being chosen is the given <number> divided by the total of all weights. If not specified, the
weight defaults to 1.0. Decimal numbers and numbers less that 1.0 are allowed. This option has
no meaning to "columns" sections.