Keep an eye out for friends on a local system
wuzzah [OPTIONS...]
wuzzah is a program that just sits around and scans the utmpx entries to watch when your friends log in and out. By default upon invocation, wuzzah looks for the file ${HOME}/.wuzzah, and loads the list of buddies contained therein (which are separated by newlines), and then sits and watches. If no file is found, and no other readable file is specified (see OPTIONS), wuzzah will attempt to just watch for whomever the current uid maps, and failing that will just quit.
an informative usage summary, though nothing you don't see here...
watches for all users on the system, period.
execute CMD upon a login. NOTE: this is done with a call to system(2), so you can do things like piping and whatever else you can do with sh -c
use FILE as buddyfile. naturally FILE must be readable, and consists of usernames, one to a line. optionally, these usernames can be followed by a colon, and then a wuzzah command-line to override wuzzah's behavior for this specific user.
tells wuzzah to not bother loading any config files.
sleep NUM seconds between each polling
use STRING as a message template to greet logged-in buddies. See the section FORMATS for more information.
don't end the messages with newlines (normally does by default)
scan the login records once, then exit
by default wuzzah doesn't message users who were already logged in when started up. this option overrides such behavior and messages them anyways (only useful with the -w/-c options)
don't message buddies when they log in (default).
use STRING as a template for displaying the status of people logging in and out. See FORMATS for more information.
adds every user in LIST (a space/comma/colon separated list of users) to the buddy list
the current version and copyright.
turns on messaging of buddies as they log in. NOTE: this can get quite annoying rather quickly. tune in soon for a less annoying solution
message templates can be defined as normal character strings, interspersed with special format characters. format characters consist of a `%', followed by a character, which defines situation-specific data. The current list of these characters is as follows:
the alert character ('\a')
the name of the buddy who has logged in/out
the date, currently in HH:MM:SS format
the remote hostname or IP address (respectively) of your buddy's login
the line in/out on which the buddy is logged (typically, something like /dev/pts/9 or /dev/ttyS0)
whether or not you have just messaged your buddy (really only useful for the -s option)
an embedded newline character
your buddy's online status ("logged on" or "logged off")
your own username, as can best be determined by the program.
a simple invocation:
username@machine$ wuzzah
(13:45:39) foo logged in on :0 (not messaging).
(13:45:39) bar logged in on pts/11 (not messaging).
Message from username@machine on pts/11 at 14:00 ...
(wuzzah) username says: "shoutout to my homie foo."
EOF
an example with a little more user customization:
username@machine$ wuzzah --message="hey, %b, it's %u. nice to see you at %d!"
and when foo logs in, foo will get a message like so:
Message from username@machine on pts/11 at 14:00 ...
hey, foo, it's username. nice to see you at (14:00:00)!
EOF
\|\$1\|
the default file containing the list of users to watch
don't know of any, but reports (and patches too) are always welcome. feel free to send them to the author.
sean finney <[email protected]>