I could probably put together an 'finit' control messages for /mail/fs/ctl that does the same thing. Also, here's a patch for the manpage, as well as one that removes /bin/seemail: diff -r e05e4b6c6546 rc/bin/seemail --- a/rc/bin/seemail Mon Oct 12 02:03:52 2020 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -#!/bin/rc - -if(~ $1 -i) exec faces -hi -if not exec faces -h diff -r e05e4b6c6546 sys/man/1/faces --- a/sys/man/1/faces Mon Oct 12 02:03:52 2020 +0200 +++ b/sys/man/1/faces Fri Oct 16 20:06:45 2020 -0500 @@ -1,124 +1,77 @@ .TH FACES 1 .SH NAME -faces, seemail, vwhois \- mailbox interface +faces, vwhois \- notification interface .SH SYNOPSIS .B faces -[ -.B -ih -] [ -.B -m -.I maildir -] -.br -.B seemail -.br + .B vwhois .I person \&... .SH DESCRIPTION The .I faces -command monitors incoming mail and -displays in its window a representation of the user's mail box -using a small image for each message. +command monitors /mnt/plumb/notify and +displays faces in its window for each well-formed message recieved +on this port. The image is typically a portrait of the sender. Which image to -display is determined by two directories /usr/$user/lib/face -and /lib/face. Entries in /usr/$user/lib/face take priority over -those in /lib/face. See +display is determined by the `sender' and `facedir' attributes +in the plumb message, with facedir defaulting to /lib/face. Entries in +/usr/$user/lib/face take priority over those in facedir. See .IR face (6), for how these directories are organised. -.PP -If the user is running -.IR plumber (4), -.I faces -reacts to plumb messages to the -.B seemail -port, -typically from -.BR upas/fs , -and is thus notified of message additions and deletions. +Additionally, the `sender' attribute can optionally be formatted as follows: +.EX + sender@site +.EE +This allows further control over which face is shown. .PP Right-clicking on a message icon causes that message to be `plumbed' to -.BR showmail . -A typical plumb action will be to display the message, such as by -the rule +the destination port specified in the original plumbing message, in the +`dst' attribute. +Usually, the original generating application is listening on this port, +but if it is not, a plumbing rule can be specified like .EX plumb start window mail -s $0 .EE -The -.IR acme (1) -mail reader listens to the -.B showmail -port automatically. +If not specified, the message is plumbed back to the `none' port. +All of the attributes specified in the original message are preserved; faces +simply ignores extraneous ones. The `wdir' field in the original message is +preserved similarly. +Programs can also sent a `winid' attribute. Faces will make the +window with that id current. .PP -If the user is not running -.IR plumber , -.I faces -reads the log file -.F /sys/log/mail -and right-clicking has no effect. +An optional attribute is a `date' \- this is used to provide a more +accurate timestamp. If unset, faces will use the date it received the +notification, potentially differing from the date of the event that +generated the notification. +.PP +The `data' field of the plumbing message should be something unique that +allows the originating application to distinguish between notifications. +It is sent back to the application unaltered when the face is clicked +as the resulting plumbing message's `data' field. +The `digest' attribute should be a hash of the `data' field concatenated +with the application's name, to prevent hash collisions between +applications that might be using the same hash algorithm and similar +contents of `data' . .PP If arrows are visible, clicking on them will scroll the display. Middle-clicking on the arrows scrolls to the end. .PP -Starting -.B faces -with the -.B -i -flag causes -.B faces -to read the messages in -.BR /mail/fs/mbox -— or the mailboxes specified with the -.B -m -flag — -upon startup. -.PP -The -.B -m -option directs -.I faces -to watch for messages arriving in -.I maildir -instead of -.BR /mail/fs/mbox . -Multiple -.B -m -flags may be used to watch multiple mailboxes. -.PP -The -.B -h -flag causes a different, venerable behavior in which -the window displays the history of messages received -rather than the current state of the mail box. -In particular, faces are not removed from the screen when messages are deleted. -Also, in this mode clicking button 1 in the display will clear the window. -.PP -.I Seemail -is an -.IR rc (1) -script that invokes -.B faces -.BR -h . -.PP .I Vwhois tells .I faces to display the icons of the named -.IR persons , -without sending a message. +.IR persons . .SH FILES -.BR /mail/fs/mbox " mail directory. +.BR /mnt/plumb/notify " the destination port for notifications. .SH SOURCE .B /sys/src/cmd/faces .br -.B /rc/bin/seemail -.br .B /rc/bin/vwhois .SH "SEE ALSO" -.IR mail (1), -.IR marshal (1), -.IR nedmail (1), .IR plumber (4), .IR face (6), .IR plumb (6) +.SH BUGS +There is no -i option anymore; instead, programs that wish to re-send old +notifications should provide their own options to do so.