Hello Mutt users! I am currently revamping my old "avatarlookup" tool [1] to work with terminal sixel graphics [2], so that I can see the sender's profile picture in the top right corner when viewing an email in mutt.
Previously, I used to use w3m's terminal image hack for that (drawing over an X11 window, like in [3]), but now that I am using a Wayland terminal, this is not a good option any more. Using sixel graphics, the hack works similar, like this: message-hook . "set display_filter='/home/gnoack/bin/muttface'" Unfortunately, the muttface shell script is quite a hack: It immediately prints the exact input mail back, but then it starts a subprocess in the background(!) which will after a delay(!) draw the sender's face directly onto /dev/tty. Drawbacks are: * It depends on timing, and that's unreliable. The delay is needed so that it draws over mutt's own rendering of the email. * Mutt is unaware of the profile picture and scrolling the mail will usually render on top of it, sometimes resulting in ugly artifacts. Is there a better way to hook into mutt for this use case? Would it be reasonable to make this a mutt feature? :) That way, mutt could redraw the picture when needed, without destroying the layout. Thanks, –Günther [1] https://github.com/gnoack/avatarlookup [2] https://www.arewesixelyet.com/ [3] https://www.df7cb.de/projects/mutt/x-face/