The two ways to change the colors and locations of your zephyrgrams are through your .Xresources file, which can be used to describes all of your X applications, or through your .zwgc.desc file, which describes only your zephyrgrams. People often change the color and locations of zephyrgrams for different Zephyr classes and instances, including things like class login (for znol login and logout announcements), and class mail (for announcements of new mail).
To change locations of zephyrs, it is first useful to understand the way the geometry is specified. This is best explained by example. The top left corner of the screen is +0+0. The first number of this is the X coordinate and the second the Y coordinate. The right edge of the screen corresponds to an X coordinate of -0, and the bottom edge to a Y coordinate of -0. The lowercase letter c refers to the center of either the x or y axis. You can also use any integer to refer to a location on the screen. +0-20, for example, is near the bottom left corner of the screen, 20 pixels up from the bottom, while -100+100 is 100 pixels away from the right side of the screen and 100 pixels down from the top of the screen.
The basic format of an entry to change geometry (location) of zephyrgrams in your .Xresources is
zwgc*style.class.instance*geometry: +x-y
where +x-y is any combination of integers, as described above. Some examples follow:
zwgc*style.message.personal*geometry: -0+0 zwgc*style.message.white-magic*geometry: +c-0 zwgc*style.login*geometry: +0+0 zwgc*style.mail*geometry: +0+30
These four lines place personal zephyrgrams in the top right corner of the screen, zephyrgrams on instance white-magic in the bottom center of the screen, login and logout zephyrgrams from znol in the top left corner of the screen, and new mail notification zephyrgrams just below login and logout zephyrgrams in the top left corner of the screen.
To do something similar by editing your .zwgc.desc file you would need to have lines something like this (I have included comments in this code with #'s, to make clearer what it is actually doing since you will need to alter this significantly to meet your needs. Any line beginning with a # is a comment, and your zwgc will ignore it (whereas you should pay attention to it):
case downcase($instance) #looks at the name of the instance after converting it to lowercase #since .zwgc.desc is case sensitive match "white-magic" #things to do if instance name is white-magic set X_geometry = "+c-0" match "personal" #things to do if instance name is personal set X_geometry = "-0+0" endcase #stops looking at instance case downcase($class) #looks at the name of the class after converting it to lowercase #since .zwgc.desc is case sensitive match "login" #things to do if class name is login set X_geometry = "+0+0" match "mail" #things to do if class name is mail set X_geometry = "+0+30" endcase
This code has the same effects as the .Xresources entries listed before. Although it is somewhat longer, some people might opt to use the .zwgc.desc method because one could then also include other customizations to .zwgc.desc for those particular classes and instances at the same time. For example, you can change the way a message is formatted. The best way to learn how to do this is to look at other people's .zwgc.desc files and pick up what the various commands are doing. Some examples can be found in the dotfiles locker. One particular .zwgc.desc file you might want to look at is rjbarbal's, which you can find in /mit/dotfiles/Zwgc.desc/rjbarbal.zwgc.desc (you need to type attach dotfiles first).
To get different colored zephyrgrams, you can modify your .Xresources file. The basic format of .Xresources entries for foreground and background colors for zephyrgrams is:
zwgc.style.class.instance*background: color
zwgc.style.class.instance*foreground: color
To avoid problems when you don't have a color screen, you can place your color preferences after a line reading
#ifdef COLOR
and follow them with a line reading
#endif
An example follows:
#ifdef COLOR zwgc.style.login*background: LawnGreen zwgc.style.login*foreground: MidnightBlue zwgc.style.message.white-magic*background: purple zwgc.style.message.white-magic*foreground: white zwgc.style.message.personal*background: blue zwgc.style.message.personal*foreground: yellow zwgc.style.mail*background: red zwgc.style.mail*foreground: black #endif
These lines would cause login announcements to show up as MidnightBlue on LawnGreen, white-magic zephyrgrams to show up as white on purple, personal messages to show up as yellow on blue, and mail notification to show up as red on black.