From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yb1-f174.google.com ([209.85.219.174]) by ewsd; Fri Oct 16 21:14:33 -0400 2020 Received: by mail-yb1-f174.google.com with SMTP id 67so3404576ybt.6 for <9front@9front.org>; Fri, 16 Oct 2020 18:14:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=VXmRXPJHIBVaEJ47+ajalAKEDGf/d2Wa3Pw2KnEXiec=; b=S7286EJxmxD5scxfPqAHZ8CqLvu3PVSpJuZxd3zjXV55APSheOzYCBIppK44qMYqJh gBxPOBBnKNKzuVGHESd+mLRX5UiM0n8R8y3JLIf9MNvCfuuPmGaVF7DAlxjU5zrSbPt+ WZ+H6R8viBi/Dw114YGSTdUVEEV4/Eat8Kaw9DTZIiOAIfcoo3AscyNpqwPoS/kP/rfK gyG5G32FJEueVv4r8e4960C2DoJUQZVqvT0olFlsItptQiOFacDZkjPHV6UDl0Wd4pEx 8XfvwqiQJW7AJwsw8IUivyFFbzsAZsDJl/qVEQsQNGWh59DS3sOcqJw1UOdG+gWTxagb g6ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=VXmRXPJHIBVaEJ47+ajalAKEDGf/d2Wa3Pw2KnEXiec=; b=OBoS82oqvW0CXACZn514RtUJh491/g4GQX1q9Wjpwb3hzNzXteEMwokOdQLCWFNdjO Bd47/iodoisBLgk0qBucIVpmr8XC6RONkG+ceT60SKOU+XTC4rkc1XxmyGIBrTIR2/an Za+uZVXKH90YPoU5xH7TDRj5nPUsIVk17d52/1k3wAhKMcaWTek1zrRZ3idrv4BZbXbt y2jFzM/vdm2cSbPXNrkoY/pnQpXjHNYezUXN/ae0UGMSxwg75FEF3mLivKyLfxgy9S70 ENhXtUpYVmMO2FCsXA5yI3bE1YZX8A8WcQh/isXkJwYlGYrEpS0wtbk/2O/OjAKCjD7c ikWQ== X-Gm-Message-State: AOAM533WVZQIg6/AxtNlUFjx2Kf9FU1baeF1GPlLFGyocTEkltIuMQ77 SXjSbUQSosj9qFhzzGNuWYd2OAP67921s79puX7G432LBsA= X-Google-Smtp-Source: ABdhPJxJadvlF7QsGVxhRtoJag3ISmOw8rmXAU/8L6RfxhD1LnQoAS2uIoFgzd4LwvPv6XD60SKIV2piW1Mo5m6soRM= X-Received: by 2002:a25:3303:: with SMTP id z3mr3499643ybz.9.1602897269398; Fri, 16 Oct 2020 18:14:29 -0700 (PDT) MIME-Version: 1.0 References: <290B9ACF9C13F61A73FEB935403A46E7@musolino.id.au> <9FB68A24BC1E203608435750D97B32C0@gmail.com> In-Reply-To: <9FB68A24BC1E203608435750D97B32C0@gmail.com> From: Silas McCroskey Date: Fri, 16 Oct 2020 18:14:18 -0700 Message-ID: Subject: Re: [9front] make faces generic To: 9front@9front.org Cc: alex@musolino.id.au Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: open self-healing self-signing out-scaling-aware interface > I like my faces(1) with -i. Maybe it would be better just write > a new program? I got http://sam-d.org/thumbs/ to a usable-but-not-really-good-enough-to-share state years ago and have been dragging my feet on getting it into a releasable state since then. Someone might be interested in picking up where I left off, or I'll get around to it when I finally quit my life-force-draining job. The more annoying bugs: * should really be a separate client and server, so that the server can live on after the client disconnects (especially for the IRC notifier use case) * no way to scroll when the number of thumbnails exceeds what's displayable on the window * sometimes deleted thumbnails stick around - sam-d On Fri, Oct 16, 2020 at 6:08 PM wrote: > > 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 foll= ows: > +.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; f= aces > +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 > -=E2=80=94 or the mailboxes specified with the > -.B -m > -flag =E2=80=94 > -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 d= eleted. > -Also, in this mode clicking button 1 in the display will clear the windo= w. > -.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 ol= d > +notifications should provide their own options to do so. > > > > ---------- Forwarded message ---------- > From: Alex Musolino > To: 9front@9front.org > Cc: > Bcc: > Date: Sat, 17 Oct 2020 10:56:40 +1030 > Subject: Re: [9front] make faces generic > I like my faces(1) with -i. Maybe it would be better just write > a new program?