Previous: zaway
Up: Simple Zephyr Hacks and Customizations
Next: Random Zsigs
When you zwrite someone using the normal zwrite command, the first thing that the zwrite does is send a ``ping'' to the person you are zwriting. This is used to checks whether they are logged in. If they are not logged in, Zephyr gives you the message:
username: Not logged in or not subscribing to messages.
To zwrite people without sending pings, you can use the option zwrite -n, which saves a bit of time and lessens the load on the zephyr servers.
When people use zwrite without the -n to write to you, you can intercept these ``pings'' and have them displayed as small Zephyrgrams, so you know who is about to send messages to you. To do this, you will need to modify your .zwgc.desc file, which describes how you want your Zephyrgrams to appear on your screen, to tell it to display the pings somewhere on your screen. Then you will know when people are about to zwrite you.
If you don't yet have a .zwgc.desc file, you should first copy the
default .zwgc.desc file into your home directory, from the file
/usr/athena/lib/zephyr/zwgc.desc. You should be sure that you
copy it to the file .zwgc.desc, as the default file does
not have the initial period. You probably want to have some basic
understanding of how the .zwgc.desc file works so that you can figure
out where to place modifications you want so that they will have the
desired effects. Sample code to receive pings for personal zephyrs
follows. A few modifications you might want to make might be to
change the X_geometry (or leave it out altogether), which determines
where to place the Zephyrgram on the screen, but also leaves that
setting for other Zephyrgrams until you change it in your .zwgc.desc
file for those cases, and to change the message printed in the ping.
You might need to read through your .zwgc.desc file to
figure out where the proper location for these lines are;
.zwgc.desc hacking is not easy to do by ``formula''. Here is what
you would need to include:
match "message"
if (upcase($opcode) == "PING") then
if (upcase($instance) == "PERSONAL" && upcase($class) == "MESSAGE") then
set X_geometry = "+0+20"
print "@b("+$sender+")"
print "@small( is about to send you a message)"
print "@beep()"
put
exit
endif
exit
endif