X-Face Headers and Mutt | |
cb | debian | bridge | irc | df7cb | projects | |
By inserting a "X-Face:" header, you can transmit a 48x48 monochrome picture in messages.
Here's my setup for Mutt.
Displaying the X-FaceThere are 3 ways to display the X-Faces:
message-hook, procmail, external viewerYou need the compface package. Set up message-hooks to call a $display_filter to display the image: (x-face muttrc snippet)I'm using procmail to extract the header and call the viewer: (x-face.procmailrc: procmail filter)message-hook . 'unset display_filter' message-hook '~h X-Face' 'set display_filter="procmail -pm $HOME/.mutt/x-face.procmailrc"' my_hdr X-Face: (nN@x(D\\O)J!Qu\\q4fh8W^7WGq ... Christian Ebert extended the script to also decode "Face:" headers: face.procmailrc# procmailrc to display X-Face images # (c) 2004 Christoph Berg, GNU GPL. # 2004-06-13 cb: initial version :0 # check if $DISPLAY is non-empty (needs procmail -p) * DISPLAY ?? . # extract X-Face: header (at least 16 chars, cf. "X-Face: ;-)") * ^X-Face: *\/.................* { :0c # pipe it through uncompface | echo $MATCH \ | { echo '/* Width=48, Height=48 */'; uncompface; } \ | icontopbm \ | xv -quit - & :0fhw # remove the header for mutt | formail -I 'X-Face:' } # spit mail back to stdout :0 | slrnfaceNote: slrnface is abandoned by its author and broken with recent X11 libs, so be careful... (2004-07-21)Note: the slrnface is broken with mutt starting ~1.5.8 (2005-03)
w3mimgdisplayTakahashi Tamotsu wrote a new patch for displaying X-Faces in Mutt using w3m's w3mimgdisplay.
Building the X-FaceInstall the compface and imagemagick packages. Then use quote-x-face to quote it for inclusion into your muttrc.Alternatively, you can use a Makefile.x-face skeleton to create an X-Face header.$ echo -n "X-Face:" > my_image.face $ convert -despeckle -geometry 48x48 my_image.jpg xbm:- | compface >> my_image.face $ ./quote-x-face my_image.face > muttrc.face See also: |
|
Christoph Berg | Page last changed Thu Nov 8 18:49:18 2007 CET |