]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blob - zephyr/zwgc/zwgc.1
Import new release
[1ts-debian.git] / zephyr / zwgc / zwgc.1
1 .\"     $Id: zwgc.1,v 1.24 2000/08/10 15:10:52 ghudson Exp $
2 '       # end of TP (cf }N below)
3 '       # copied here, since we use @ in some of our tags, and that
4 '       # messes up \w and \h
5 .de }1
6 .ds ]X \&\\*(]B\\
7 .nr )E 0
8 .if !"\\$1"" .nr )I \\$1n
9 .}f
10 .ll \\n(LLu
11 .in \\n()Ru+\\n(INu+\\n()Iu
12 .ti \\n(INu
13 .ie !\\n()Iu+\\n()Ru-\w'\\*(]X'u-3p \{\\*(]X
14 .br\}
15 .el \\*(]X\h@|\\n()Iu+\\n()Ru@\c
16 .}f
17 ..
18 .de }N
19 .if \\n()E .br
20 .di
21 .if "\\n()E"0" .}f
22 .if "\\n()E"1" .}1
23 .if "\\n()E"2" .}2
24 .nr )E 0
25 ..
26 '       # tagged paragraph (paragraph with hanging label, but no para spacing)
27 .de TQ
28 .if !"\\$1"" .nr )I \\$1n
29 .ne 1.1v
30 .in \\n()Ru
31 .nr )E 1
32 .ns
33 .it 1 }N
34 .di ]B
35 ..
36 .TH ZWGC 1 "November 30, 1989" "MIT Project Athena"
37 .SH NAME
38 zwgc \- Zephyr Windowgram Client program
39 .SH SYNOPSIS
40 .B zwgc
41 [ \-reenter ] [ \-nofork ] [ \-ttymode ] [ \-f
42 .I filename
43 ] [ \-subfile
44 .I filename
45 ] [ \-loc
46 .I text
47 ] [ \-default
48 .I portname
49 ] [ \-disable 
50 .I portname
51 ] ... [ output driver options ]
52 [ X Toolkit options... ]
53 .SH DESCRIPTION
54 .I Zwgc
55 is the main
56 .I zephyr(1)
57 client.  It is responsible for receiving selected zephyr notices on
58 behalf of the user, formatting them, and displaying them using
59 one or more of the output devices.
60
61 .SS "Selection of Zephyr Notices"
62 .PP 
63 .I Zwgc
64 subscribes to various notice classes and instances on behalf of the
65 user.  Only notices in the subscription list will be received.  The
66 subscription list is composed of the default subscriptions (stored on
67 the server), the user's subscriptions file, and any subscriptions made
68 using
69 .IR zctl (1).
70 The user's subscription file defaults to
71 .IR $HOME/.zephyr.subs ,
72 or it can be specified with the \-subfile
73 option.  If "\-" is specified as the subscription filename, the
74 subscriptions will be read from standard input.
75
76 .PP
77 The
78 .I zctl
79 command is used to manipulate and change subscriptions.  See the
80 .IR zctl (1)
81 man page for details.
82
83 .SS "Zephyr Description Files"
84 .PP
85 .I Zwgc
86 formats its output messages according to the commands in its
87 description file.  The user's description file 
88 .RI ( $HOME/.zwgc.desc
89 by default, or whatever is specified by -f) is read, or the system file
90 is read if the user's does not exist.
91 .PP
92 Every time a notice is received, 
93 .I zwgc
94 runs through the description file, and executes the appropriate commands.
95
96 .SS "Zephyr Description File Syntax"
97 .PP
98 A description file is simply a list of commands.  Whitespace (spaces,
99 tabs, and line breaks) is used
100 to separate tokens.  The type and amount of whitespace separating tokens
101 is irrelevant.
102 Comments can be delimited by # and newline (for line-oriented comments,
103 e.g. "# this is a comment" on a line by itself) or by /* and */ (e.g. "/*
104 this is a comment */").
105
106 .SH "DESCRIPTION LANGUAGE"
107 .SS Expressions
108 Expressions are used by certain commands.
109 They are composed from string literals, variable references,
110 function calls, and operators.  Parentheses can be used anywhere in an
111 expression to group expressions or increase readability.
112 .PP
113 String literals are specified by putting the contents in "double quotes".
114 .PP
115 Variables are set using the
116 .B set
117 command (see "COMMANDS", below).  They are
118 referenced in an expression by using the form
119 .IR $varname .
120 Some variables are set by default for each notice.
121 All other variables retain their values between notice interpretations,
122 so that if you set a variable, it retains that value until later
123 modified.
124 .PP
125 Functions are called using a C-like syntax,
126 \fBfname\fR(\fIexpr1\fR,\fIexpr2\fR), where
127 .B fname
128 is the
129 function name and
130 .IB expr n
131 are the arguments.
132 .PP
133 Binary operators use infix notation, such as "a == b".
134 .PP
135 Some commands use an expression list (exprlist), which is simply a set
136 of expressions separated by whitespace (e.g. $var1 "lit1" $var2).
137
138 .SS "Default variables"
139 .PP
140 The following variables are always available:
141 .TP 5
142 .B 1, ...
143 Numeric variables are assigned values corresponding to that field in the
144 notice (the body of each notice is conceptually an array of fields, each
145 terminated with a null character).  If the number is greater than the
146 number of fields actually in the notice, the value is "".  For example,
147 the standard zwrite messages have two fields: $1 is the signature, and
148 $2 is the text of the message.
149 .TP 5
150 .B auth
151 An indication of the authenticity of the notice.  ``yes'' means the
152 notice is authentic, ``no'' means it is not, and ``forged'' means that
153 the message claimed to be authentic but the verification of the claim
154 failed.  The ``forged'' indication usually appears when a user has
155 changed his Kerberos tickets with
156 .IR kinit (1)
157 but has not run ``zctl sub'' to
158 register this change with the Zephyr servers.
159 .TP
160 .B class
161 The class of the current notice.
162 .TP
163 .B date
164 The date on which the notice was sent.
165 .TP
166 .B default
167 The default output format for the current notice
168 .TP
169 .B error
170 An error message from the port read/write commands.
171 .TP
172 .B fromhost
173 The full name of the host from which the notice appears to have been
174 sent.  
175 .I This is not fully reliable,
176 as the information used to determine this hostname is not guaranteed to
177 be correct (even for authentic messages).
178 .TP
179 .B fullsender
180 The notice sender's name, including the zephyr realm name.
181 .TP
182 .B instance
183 The instance of the current notice.
184 .TP
185 .B kind
186 The kind of notice.
187 .TP
188 .B message
189 The full text of the message, with nulls converted to newlines.
190 .TP
191 .B number_of_fields
192 The number of fields in the message (a string representation of a
193 decimal number).
194 .TP
195 .B opcode
196 The opcode of the current notice.
197 .TP
198 .B output_driver
199 The name of the output driver in use.
200 .TP
201 .B port
202 The port from which the notice was sent.
203 .TP
204 .B realm
205 The local zephyr realm.
206 .TP
207 .B recipient
208 The recipient for the current notice.  If the notice is a multicast
209 (sent to several people), the recipient is set to ``*''.
210 .TP
211 .B sender
212 Usually a shortened version of fullsender.  If the realm of the sender
213 is equal to the realm of the recipient,
214 .I sender
215 omits the realm name.
216 .TP
217 .B time
218 The time of day at which the notice was sent.
219 .TP
220 .B user
221 The full zephyr name of the user (e.g. marc@ATHENA.MIT.EDU).
222 .TP
223 .B version
224 The current version of 
225 .IR zwgc .
226 .TP
227 .B zephyr_version
228 The protocol version of the notice.
229 .PP
230 All of these variables (except for error, output_driver, and version)
231 are re-set before each notice is processed.
232
233 .SS Functions
234 .PP
235 Following is a list of functions available for use in the description
236 file.
237 .TP 5
238 .BI buffer ()
239 The contents of the current output buffer.
240 .TP
241 .BI downcase (expr)
242 Returns the value of \fIexpr\fR, converted to lower case.
243 .TP
244 .BI get (expr)
245 Returns a line from the port named \fIexpr\fR.  If there is no text
246 waiting on the port (e.g. the program connected to the port has not
247 printed any output), this function will wait until it can read a line of
248 text from the port.
249 .TP
250 .BI getenv (expr)
251 Returns the value of the environment variable \fIexpr\fR, or the empty
252 string if it does not exist.
253
254 .TP
255 .BI lany "(expr1, expr2), " rany "(expr1, expr2)"
256 Return a number of characters equal to the length of
257 .I expr2
258 from the beginning
259 .RB ( lany )
260 or end 
261 .RB ( rany )
262 of
263 .I expr1
264 (e.g. lany("1234567890","foo") would return "123").
265 If
266 .I expr1
267 is a variable reference, the variable
268 is modified to remove the characters returned.
269 If
270 .I expr2
271 is longer than
272 .IR expr1 ,
273 the value of
274 .I expr1
275 is returned (and 
276 .I expr1
277 is set to "", if a variable).
278 .TP
279 .BI lbreak "(expr1, expr2), " rbreak "(expr1, expr2)"
280 .I Expr2
281 defines a set of characters.  The function returns the longest
282 initial
283 .RB ( lbreak )
284 or final 
285 .RB ( rbreak )
286 string from
287 .I expr1
288 composed of characters
289 .I not
290 in this set (e.g. lbreak("characters", "tuv") would return "charac").  If
291 .I expr1
292 is a variable reference, the variable
293 is modified to remove the characters returned.  If no characters
294 in
295 .IR expr2 " are in " "expr1, " then " expr1 "
296 is returned (and 
297 .I expr1
298 is set to "", if a variable).
299 .TP
300 .BI lspan "(expr1, expr2), " rspan "(expr1, expr2)"
301 These functions are the negation of the 
302 .B break
303 functions; the returned string consists of characters 
304 .I in 
305 the set defined by
306 .I expr2
307 .TP
308 .BI protect (expr)
309 Returns a string which will be evaluated identically to \fIexpr\fR,
310 but will not affect any surrounding environments.  That is, any
311 characters which could close outside environments are quoted, and any
312 environments in \fIexpr\fR which are not closed at the end are closed.
313 .TP
314 .BI substitute (expr)
315 Evaluates variable references of the form \fI$variable\fR in expr and
316 converts $$ to $.
317 .TP
318 .BI upcase (expr)
319 Returns the value of \fIexpr\fR, converted to upper case.
320 .TP
321 .BI verbatim (expr)
322 Returns a string that will be displayed exactly as \fIexpr\fR looks.
323 Anything which could be mistaken for an environment is quoted.
324 .TP
325 .BI stylestrip (expr)
326 Returns \fIexpr\fR with all environments stripped out.
327 .TP
328 .BI zvar (expr)
329 Returns the value of the zephyr variable \fIexpr\fR,
330 or the empty
331 string if it does not exist.  [Zephyr variables
332 can be set and examined with 
333 .IR zctl (1).]
334
335 .SS Operators
336 .PP
337 Following is a list of operators which can be used in the description
338 file to compose expressions:
339 .TP
340 .IB expr1 " + " expr2
341 String concatenation of
342 .IR expr1 " and " expr2
343 .TP
344 .IB expr1 " == " expr2
345 True if the two expressions are equal, false otherwise.
346 .TP
347 .IB expr1 " =~ " expr2
348 True if the regular expression pattern
349 .IR expr2 " matches " expr1.
350 .TP
351 .IB expr1 " !~ " expr2
352 Negation of "=~".
353 .TP
354 .IB expr1 " != " expr2
355 Negation of "=="
356 .TP
357 \fIexpr1\fB and \fIexpr2\fR, \fIexpr1\fB & \fIexpr2\fR
358 True if
359 .IR expr1 " and " expr2
360 are both true.
361 .TP
362 \fIexpr1\fB or \fIexpr2\fR, \fIexpr1\fB | \fIexpr2\fR
363 True if either of
364 .IR expr1 " or " expr2
365 are true.
366 .TP
367 \fB! \fIexpr1\fR, \fBnot \fIexpr1\fR
368 The logical negation of
369 .I expr1.
370
371 .SS Commands
372 .PP
373 Following is a list of the commands usable in the description
374 language:
375 .TP 5
376 .BI appendport " expr1 expr2"
377 Creates a port called \fIexpr1\fR.  All output to the port will be
378 appended to the file \fIexpr2\fR.  There is no input.  If the file is
379 created, its mode is set to read-write, owner only (no access for others).
380 .TP
381 .B break
382 Exits the innermost if, case, or while block.
383 .if n .ll +2in
384 .TP
385 \fBcase \fIexpr1\fR [ ((\fBmatch \fIexpr\fR [,\fIexpr ...\fR]) | \fBdefault\fR)\fI commands \fR] ... \fBendcase\fR
386 Evaluates \fIexpr1\fR.  Then, each of the match expressions is
387 evaluated in order.  The first time an expression matches \fIexpr1\fR,
388 then the body of commands under it is executed, and the rest of the case
389 statement is skipped.  This compare is case-insensitive.  default always
390 matches, so it should always appear as the last set of commands.  See
391 the default description file for an example of use.
392 .TP
393 .B clearbuf
394 Clears the output buffer (see below for details on buffering).
395 .TP
396 .BI closeinput " expr"
397 Closes the file associated with \fIexpr\fR.
398 .TP
399 .BI closeoutput " expr"
400 Sends an EOF (end-of-file) to the process if \fIexpr\fR was a port created by
401 execport, or closes the file if it was created by outputport or
402 appendport.
403 .TP
404 .BI closeport " expr"
405 Closes both input and output of \fIexpr\fR as defined above.
406 .TP
407 .BI fields " variable1 ..."
408 sets the list of variables to be equal to the fields in the
409 notice.  If there are more variables than fields, the extra
410 variables are left empty.
411 .TP
412 .BI exec " exprlist"
413 Executes a program without any input or output.  A command named by
414 \fIexprlist\fR is executed.  Each expression is used as an argument to
415 the program; the first expression names the program (it may be either an
416 absolute pathname, or a program name; the user's PATH is searched to
417 find simple program names).
418 .TP
419 .BI execport " expr1 exprlist"
420 Creates a port called \fIexpr1\fR.  A command named by \fIexprlist\fR
421 is executed, as described above for \fBexec\fR.
422 All output to the port is sent to the standard input
423 of the process.  Reading from the port will return the standard output
424 of the process.
425 .TP
426 .B exit
427 Completes processing of the current notice.  The remainder of the
428 description file is ignored after execution of this command.
429 .\" hack because the following line otherwise breaks because it is too long.
430 .if n .ll +2in
431 .TP
432 \fBif \fIexpr1 \fBthen \fIcommands1\fR [\fBelseif \fIexpr2 \fBthen \fIcommands2\fR] ... [\fBelse \fIcommandsn\fR] \fBendif\fR
433 If \fIexpr1\fR evaluates to true, execute \fIcommands1\fI, etc. [A conditional
434 construct, similar to the constructs in the C shell (csh).]
435 .TP
436 .BI inputport " expr1 expr2"
437 Creates a port called \fIexpr1\fR.  All input from the port comes from
438 the file \fIexpr2\fR.  There is no output.
439 .TP
440 .B noop
441 does nothing
442 .TP
443 .BI outputport " expr1 expr2"
444 Creates a port called \fIexpr1\fR.  The file \fIexpr2\fR will be
445 truncated, or created if it does not exist.  All output to the port
446 will be appended to the file \fIexpr2\fR.  There is no input.  If the file is
447 created, its mode is set to read-write, owner only (no access for others).
448 .TP
449 .BI print " expr1 ..."
450 adds the values of the expressions to the current output buffer.  The
451 values of the expressions are separated by spaces in the output.
452 .TP
453 .B put \fR[\fIexpr \fR[\fIexprlist\fR]]
454 Sends data to a port.  If \fIexpr\fR is provided, then it is used as the
455 port, otherwise the port used is the
456 port corresponding to the default output device.
457 If \fIexprlist\fR is provided, the expressions in the list are sent to
458 the port, separated by spaces.  If it is omitted, then the contents
459 of the output buffer are sent as the data.
460 .TP
461 .BI set " variable " = " expr"
462 sets
463 .I variable
464 equal to
465 .IR expr .
466 Variable can later be
467 referenced by 
468 .IR $variable .
469 .TP
470 .BI show " text " endshow
471 Appends text to the output buffer.  This command is special, because
472 the string does not need to be quoted.  Whitespace at the beginning or
473 end of the lines of text is ignored.  The \fIendshow\fR must appear as
474 the first token on a line (it may only be preceded on that line by whitespace).
475 Variable substitutions and formatting commands
476 (but not expressions or functions) are processed in the text.  Example:
477 .nf
478 show
479    this is some text
480    from: $sender
481 endshow
482 .fi
483 .TP
484 .BI while " expr " do " statements " endwhile
485 Executes \fIstatements\fR until \fIexpr\fR is false.
486
487 .SH PORTS
488 .PP
489 Ports are an abstraction encompassing all I/O forms of which
490 zwgc is capable.  There are pre-existing output ports corresponding to each
491 of the output devices, and more ports can be created with the
492 port commands described above.
493
494 .SH OUTPUT
495 The output is usually collected in the
496 .I "output buffer"
497 and saved until a
498 .I put
499 command sends the output to an output device (such as an X display or a
500 terminal).  The output buffer is implicitly cleared after each notice is
501 completely processed.
502
503 .PP
504 Output devices are implemented as output ports.  A message is
505 displayed in a device-dependent manner when a string is output to the
506 port corresponding to the output device.  Formatting commands are
507 embedded in the text as @ commands of the form @command(text).
508 Command names are case-insensitive and consist of alphanumeric
509 characters and underscores.  Valid brackets are () [] {} and <>.
510 If the command name is empty (such as in
511 .RB `` @(foo) ''),
512 then a new
513 environment with no changes is created (This is useful to temporarily
514 change some parameter of the output, such as the font).
515 .PP
516 The following output devices are supported:
517 .TP 5
518 stdout
519 Sends the string to standard output exactly as is.
520 .TP
521 stderr
522 Sends the string to standard error exactly as is.
523 .TP
524 plain
525 Sends the string with all formatting environments removed to standard
526 output.
527 .TP
528 tty
529 Does formatting on the message according to @ commands embedded in the
530 text.  The output,
531 with appropriate mode-changing sequences, is sent to the standard output.
532 The appropriate characteristics of the display are taken from
533 the TERMCAP entry (see
534 .IR termcap (5)) 
535 for the terminal named by the TERM environment variable.
536 Supported @ commands are:
537 .RS 10
538 .\" .TQ 15
539 .\" @em
540 .\" Emphasis.  Use underline if available, else reverse video.
541 .TQ 15
542 @roman
543 Roman (plain) letters (turns off all special modes).
544 .TQ
545 @b or @bold
546 Bold letters.  If not available, reverse video, else underline.
547 .TQ
548 @i or @italic
549 Italic letters (underlining, if available).
550 .TQ
551 @beep
552 "bl" termcap entry, else "^G" (beep the terminal); limited to once per
553 message.
554 .\" .TQ
555 .\" @blink
556 .\" "mb"/"me" termcap entry, else nothing.
557 .\" .TQ
558 .\" @rv
559 .\" "so"/"se" termcap entry.
560 .\" .TQ
561 .\" @u
562 .\" "us"/"ue" termcap entry.
563 .TQ
564 @l or @left
565 left aligned
566 .TQ
567 @c or @center
568 center aligned
569 .TQ
570 @r or @right
571 right aligned
572 .RE
573 .IP "" 5
574 Other @-commands are silently ignored.
575 .TP 5
576 X
577 Displays one window per string output to the port.  The output is
578 formatted according to @ commands embedded in the string.  Supported
579 @ commands are:
580 .RS 10
581 .TQ 15
582 @roman
583 turns off @italic and @bold
584 .TQ
585 @b or @bold
586 turns on boldface
587 .TQ
588 @i or @italic
589 turns on italics
590 .TQ
591 @l or @left
592 left aligned
593 .TQ
594 @c or @center
595 center aligned
596 .TQ
597 @r or @right
598 right aligned
599 .TQ
600 @large
601 large type size
602 .TQ
603 @medium
604 medium type size
605 .TQ
606 @small
607 small type size
608 .TQ
609 @beep
610 Ring the X bell (limited to once per message)
611 .TP
612 @font
613 sets the current font to the font specified in the contents of the
614 environment (e.g. @font(fixed)).  This will remain in effect for the
615 rest of the environment (a temporary change can be achieved by enclosing the
616 font-change in an @(...) environment).  If the named font is not
617 available, the font ``fixed'' is used instead.
618 .TP
619 @color
620 sets the color to the color specified in the contents of the
621 environment.  The color name should appear in the X color name database.
622 This color will remain in effect for the rest of the environment.  If
623 the named color is not available, the default foreground color is used.
624 .RE
625 .IP "" 5
626 Any other environment name not corresponding to the above environment
627 names will set the current ``substyle.''
628 .IP
629 The attributes of a given block of text are determined by any active
630 environments, evaluated in the context of the current style and
631 substyle.
632 .IP
633 The style is specific to each window.  Its name has three dot
634 (``.'') separated fields, which are by default the values of the class,
635 instance, and recipient variables, with all dots changed to underscores
636 (``_'') and all letters converted to lowercase.  The style can be
637 altered by setting the
638 .I style
639 variable.  Note that it \fBmust always\fR have exactly two ``.''
640 characters in it.
641 .IP
642 The substyle is determined by @ commands in the message text.
643 .IP
644 Zwgc variables which the X output device reads are:
645 .RS 10
646 .TQ 15
647 default_X_geometry
648 default geometry for notices, set from resources
649 .TQ
650 X_geometry
651 overrides geometry in resource file, if set
652 .TQ
653 default_X_background
654 default background color for notices, set from resources
655 .TQ
656 X_background
657 overrides bgcolor in resource file, if set
658 .TQ
659 style
660 style, as described above
661 .RE
662 .IP "" 5
663 The expected geometry values are described below.
664 .IP
665 The fonts and color for a piece of text are determined by the styles
666 defined in the X resources file.  The following resources relating to
667 text style are used by zwgc:
668 .RS 10
669 .TP 10
670 zwgc.style.\fIstylenames\fR.geometry
671 geometry for messages of the specified style
672 .TP
673 zwgc.style.\fIstylenames\fR.background
674 background color for messages of the specified style
675 .TP
676 zwgc.style.\fIstylenames\fR.substyle.\fIsubstylename\fR.fontfamily
677 fontfamily name for the specified style and substyle
678 .TP
679 zwgc.style.\fIstylenames\fR.substyle.\fIsubstylename\fR.foreground
680 foreground color for the specified style and substyle
681 .TP
682 zwgc.fontfamily.\fIfontfamilyname\fR.\fIsize\fR.\fIface\fR
683 specifies the fonts for a given fontfamily.  \fIsize\fR is one
684 of small, medium, or large, and \fIface\fR is one of roman,
685 bold, italic, or bolditalic.
686 .RE
687 .IP "" 5
688 The best way to get started in customizing X resources for
689 .I zwgc
690 is to examine the default application resources and other users'
691 resources to understand how they specify the default appearance.
692
693 .SH "X RESOURCES"
694 Other X resources used by
695 .I zwgc
696 are listed below.
697 Entries like
698 .sp
699 .nf
700 .in +5
701 zwgc*option: value
702 Zwgc*option: value
703 zwgc.option: value
704 *option: value
705 .option: value
706 .in -5
707 .fi
708 .sp
709 will work.
710 .PP
711 An entry labeled with zwgc*option in any of the sources takes precedence
712 over Zwgc*option, which takes precedence over *option entries.
713 The following sources are searched in order:
714 .nf
715 .in +5
716 command-line arguments (-xrm)
717 contents of file named by XENVIRONMENT environment variable
718 X server resource database (see \fIxrdb\fR(1))
719 application resources file
720 .in -5
721 .fi
722 .PP
723 Logical values can be ( Yes On True T ) or ( No Off False nil ).
724 .TP 15
725 \fBOPTION:\fR
726 \fBMEANING [default]:\fR
727 .TP
728 cursorCode
729 number of a code from the cursorfont (should be an even integer, see
730 \fI<X11/cursorfont.h>\fR) to use for the windows.
731 .TP
732 foreground
733 Primary foreground color
734 .TP
735 Foreground
736 Secondary foreground color (if foreground not set) [BlackPixel is the default if neither is set]
737 .TP
738 background
739 Primary background color
740 .TP
741 Background
742 Secondary background color (if background not set) [WhitePixel is the
743 default if neither is set]
744 .TP
745 borderColor
746 Primary border color
747 .TP
748 BorderColor
749 Secondary border color (if borderColor not set) [BlackPixel is the
750 default if neither is set]
751 .TP
752 pointerColor
753 Primary mouse pointer color [foreground color is the default if not set]
754 .TP
755 reverseVideo
756 (logical) Toggles foreground and background (and border, if it matches
757 foreground or background). 
758 .TP
759 ReverseVideo
760 Secondary toggle, if reverseVideo is not set. [off is the default if
761 neither is set]
762 .TP
763 borderWidth
764 Primary border width selector
765 .TP
766 BorderWidth
767 Secondary border width selector (if borderWidth is not set) [1 is the
768 default value if neither is set]
769 .TP
770 internalBorder
771 Primary border between edge and text
772 .TP
773 InternalBorder
774 Secondary selector (if internalBorder not set) [2 is the default value
775 if neither is set]
776 .TP
777 geometry
778 Primary POSITION (not size) geometry specifier.
779 The geometry should be of the form "{+|\-}x{+|\-}y", specifying an (x,y)
780 coordinate for a corner of the window displaying the notice.  The
781 interpretation of positive and negative location specifications follows
782 the X conventions.  A special location of `c' for either x or y
783 indicates that the window should be centered along that axis.  Example:
784 a geometry of "+0+c" specifies the window should be at the top of the
785 screen, centered horizontally.
786 .TP
787 Geometry
788 Secondary position specifer. [+0+0 is the default if neither is set.]
789 .TP
790 resetSaver
791 (logical) Primary value to force screen to unsave when a message first
792 appears.
793 .TP
794 ResetSaver
795 (logical) Secondary value to force screen to unsave. [default True] 
796 .TP
797 reverseStack
798 (logical) Primary value to specify that zwgc should attempt to stack
799 WindowGram windows such that the oldest messages
800 normally show on top.  Some X window managers may silently ignore
801 .IR zwgc 's
802 attempts to restack its windows.  This option can cause some unusual
803 interactions with other windows if the user manually restacks either the
804 other windows or the WindowGram windows.
805 .TP
806 ReverseStack
807 Secondary value to enable reverse stacking. [default False] 
808 .TP
809 title
810 (string) Primary window title
811 .TP
812 Title
813 Secondary window title [defaults to the last pathname component
814 of the program name, usually "zwgc"]
815 .TP
816 transient
817 (logical) Primary value which determines if zephyrgram windows will be
818 created with the \fBWM_TRANSIENT_FOR\fR property set.  If this
819 resource is true, the property will be set, telling certain
820 windowmanagers to treat zephyrgram windows specially.  For instance,
821 \fItwm\fR will not put decorations on transient windows, \fImwm\fR
822 will not let you iconify them, and \fIuwm\fR ignores the resource
823 entirely.
824 .TP
825 Transient
826 Secondary transient determining value [default False]
827 .TP
828 enableDelete
829 (logical) If true, zwgc creates a WM_PROTOCOLS property on all zgrams, with
830 WM_DELETE_WINDOW as contents.
831 .TP
832 EnableDelete
833 Secondary value to enable WM_DELETE_WINDOW protocol on zgrams [default False]
834 .TP
835 minTimeToLive
836 Primary value which specifies the minimum amount of time (``minimum time to
837 live'') a WindowGram must be on-screen (in milliseconds) until it can
838 be destroyed.  This feature is useful to avoid accidentally clicking
839 on new WindowGrams when trying to delete old ones.
840 .TP
841 MinTimeToLive
842 Secondary value of ``minimum time to live.''
843 .TP
844 iconName
845 (string) Primary icon name
846 .TP
847 IconName
848 Secondary icon name [defaults to the last pathname component
849 of the program name, usually "zwgc"]
850 .TP
851 name
852 (string) Primary window class name
853 .TP
854 name
855 Secondary window class name [defaults to the last pathname component
856 of the program name, usually "zwgc"]
857 .TP
858 synchronous
859 (logical) Primary X synchronous mode specifier.  On means to put the X
860 library into synchronous mode.
861 .TP
862 Synchronous
863 Secondary X synchronous mode specifier.  [default is `off']
864 .PP
865 The window class is always "Zwgc".
866 .SH X BUTTONS
867 .PP
868 Clicking and releasing any button without the shift key depressed while
869 the pointer remains inside a WindowGram window will cause it to
870 disappear. If the pointer leaves the window
871 while the button is depressed, the window does not disappear; this
872 provides a way to avoid accidentally losing messages.
873 .PP
874 If the control button is held down while clicking on a WindowGram,
875 then that WindowGram and all windowgrams under the point where the
876 button is released will be erased.
877 .PP
878 .B WARNING:
879 If you do this with too many WindowGrams under the mouse, it is
880 possible for your subscriptions to be lost.  If \fIzctl retrieve\fR
881 returns nothing, then issue a \fIzctl load\fR command to re-subscribe
882 to your default set of subscriptions.  If you use znol, then \fIznol
883 -q &\fR will restore the subscriptions you need for \fIznol\fR.
884 .PP
885 Portions of the text of a message may be selected for "pasting" into other X
886 applications by using the shift key in cooperation with the pointer
887 buttons.
888 Holding the Shift key while depressing Button1 (usually the left button)
889 will set a marker at the
890 text under the pointer.  Dragging the pointer with Shift-Button1 still
891 depressed extends the selection from the start point, until the button
892 is released.  The end of the selection may also be
893 indicated by releasing Button1, holding down the Shift key, and pressing
894 Button3 (usually the right button) at the desired endpoint of the selection.
895 The selection will appear with the text and background colors reversed.
896
897 .SH ADDITIONAL X FEATURES
898 If
899 .I zwgc
900 receives a WM_DELETE_WINDOW, it destroys the zephyrgram as if it were
901 clicked on.
902 .PP
903 If a zephyrgram is unmapped, it is removed from the stacking order
904 used by reverseStack.
905
906 .SH COMMAND LINE
907 .I zwgc
908 is normally invoked from 
909 .IR /usr/athena/lib/init/login ,
910 .IR $HOME/.xsession ,
911 or 
912 .I /usr/athena/lib/init/xsession
913 in the foreground. When it has successfully set your location and
914 obtained subscriptions, it will put itself into the background (unless
915 the \-nofork option has been specified). At this point it is safe to
916 invoke additional zephyr commands, such as
917 .IR znol (1).
918 (You can also put these commands in the
919 .I initprogs
920 Zephyr variable; the value of this variable is passed as the argument to
921 the
922 .IR system (3)
923 library call during initialization.)
924 .I zwgc
925 will exit with an exit
926 status of 0 if it was able to open the X display successfully or 1 if it
927 couldn't open the display and the Zephyr variable
928 .I fallback
929 was set to ``false''. If
930 .I fallback
931 is set to ``true'',
932 .I zwgc
933 will fall back to ``ttymode'' (making the tty driver the default output
934 device) if it can't open the X display.  If
935 .I fallback
936 is not set and the display cannot be opened,
937 .I zwgc
938 prints an explanatory message and exits with a status of 1.
939 .PP
940 If the
941 .I \-ttymode
942 option is specified,
943 .I zwgc
944 will ignore any X display and use the terminal as its primary output
945 device.  This flag overrides any setting of the fallback variable.
946 .PP
947 If the
948 .I \-loc
949 option is specified,
950 .I zwgc
951 will use the specified string as the tty field for the location it
952 sets.  This allows users to potentially specify more useful auxiliary
953 information than their ttys or display names.
954 .PP
955 The
956 .I \-reenter
957 option is provided for compatibility with the previous version of
958 .IR zwgc .
959 .PP
960 .I zwgc
961 will exit cleanly (unset location and cancel subscriptions) on:
962 .nf
963         SIGTERM
964         SIGHUP
965         XIOError (with a message to stderr)
966 .fi
967 SIGHUP is what it expects to get upon logout.  Also, the signals
968 SIGINT, SIGQUIT, and SIGTSTP are ignored because they can be sent
969 inadvertently, and bizarre side-effects can result.  If you want them
970 to be acted on, then run
971 .I zwgc -nofork &
972
973 .SH CONTROL MESSAGES
974 In order to allow some special user controls over the behavior of
975 .IR zwgc ,
976 certain Zephyr control notices can be sent directly to
977 .I zwgc
978 using the
979 .IR zctl (1)
980 program. Currently implemented controls are
981 .TP 15
982 wg_read
983 tell
984 .I zwgc
985 to re-read the current description file.
986 .TP
987 wg_shutdown
988 tell 
989 .I zwgc
990 to cancel all subscriptions and stop acting on incoming notices. 
991 .I zwgc
992 saves the subscriptions that were in effect at the time of the shutdown
993 so that it can restore them later if needed.
994 .TP
995 wg_startup
996 tell 
997 .I zwgc
998 to restart from being shutdown and reinstall the saved subscriptions.
999 .PP
1000 Other control messages may be implemented in the future.
1001
1002 .SH EXAMPLES
1003 For an example of a description file, see
1004 .IR /usr/athena/share/zephyr/zwgc.desc .
1005 For an example of X resources, see
1006 .IR /usr/athena/share/zephyr/zwgc_resources .
1007
1008 .SH BUGS
1009 The X selection code can highlight the wrong portions of messages
1010 containing formatted text placed with the @center() or @right()
1011 directives.
1012 .PP
1013 If you are using Kerberos support and get new tickets (using
1014 ``kinit''), you must send a subscription notice to the server (using a
1015 command such as ``zctl load /dev/null'') or all received Zephyr
1016 notices will appear to be unauthentic.  (If all received Zephyr
1017 notices appear to be forged, your tickets have probably expired, in
1018 which case you must get new tickets and then run ``zctl load
1019 /dev/null''.)
1020 .SH FILES
1021 .TQ 15
1022 $HOME/.zwgc.desc
1023 Default location of user's description file
1024 .TQ
1025 /usr/athena/share/zephyr/zwgc.desc
1026 System-wide description file
1027 .TQ
1028 /usr/athena/share/zephyr/zwgc_resources
1029 Default X application resources.
1030 .TQ
1031 $HOME/.zephyr.vars
1032 File containing variable definitions
1033 .TQ
1034 $HOME/.zephyr.subs
1035 Supplementary subscription file
1036 .TQ
1037 $HOME/.Xresources
1038 Standard X resources file
1039 .TQ
1040 $WGFILE or /tmp/wg.\fIuid\fR
1041 File used to store WindowGram port number for other clients
1042 .SH SEE ALSO
1043 csh(1), kinit(1), xrdb(1), zctl(1), zephyr(1), znol(1), X(1), getenv(3),
1044 system(3), termcap(5), zephyrd(8), zhm(8)
1045 .br
1046 Project Athena Technical Plan Section E.4.1, `Zephyr Notification Service'
1047 .SH AUTHORS
1048 .nf
1049 John Carr (MIT/Project Athena) <jfc@athena.mit.edu>
1050 Marc Horowitz (MIT/Project Athena) <marc@athena.mit.edu>
1051 Mark Lillibridge (MIT/Project Athena) <mdl@CS.CMU.EDU>
1052 .fi
1053 .SH RESTRICTIONS
1054 Copyright (c) 1989 by the Massachusetts Institute of Technology.
1055 All Rights Reserved.
1056 .br
1057 .I zephyr(1)
1058 specifies the terms and conditions for redistribution.