9front - general discussion about 9front
 help / color / mirror / Atom feed
From: covertusername967@gmail.com
To: alex@musolino.id.au, 9front@9front.org
Subject: Re: [9front] make faces generic
Date: Fri, 16 Oct 2020 20:07:26 -0500	[thread overview]
Message-ID: <9FB68A24BC1E203608435750D97B32C0@gmail.com> (raw)
In-Reply-To: <290B9ACF9C13F61A73FEB935403A46E7@musolino.id.au>

[-- Attachment #1: Type: text/plain, Size: 5137 bytes --]

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.

[-- Attachment #2: Type: message/rfc822, Size: 3389 bytes --]

From: Alex Musolino <alex@musolino.id.au>
To: 9front@9front.org
Subject: Re: [9front] make faces generic
Date: Sat, 17 Oct 2020 10:56:40 +1030
Message-ID: <290B9ACF9C13F61A73FEB935403A46E7@musolino.id.au>

I like my faces(1) with -i.  Maybe it would be better just write
a new program?

  reply	other threads:[~2020-10-17  1:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14 23:42 covertusername967
2020-10-15  3:24 ` covertusername967
2020-10-17  2:04   ` ori
2020-10-18  3:26     ` covertusername967
2020-10-17  0:26 ` Alex Musolino
2020-10-17  1:07   ` covertusername967 [this message]
2020-10-17  1:14     ` Silas McCroskey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9FB68A24BC1E203608435750D97B32C0@gmail.com \
    --to=covertusername967@gmail.com \
    --cc=9front@9front.org \
    --cc=alex@musolino.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).