Using quicklook as an image viewer for mutt

19 Mar 2009

Posted by acrollet

So, I'm wavering between email clients yet again - giving the mutt+isync combination a try this time... Mutt's disconnected imap support is sadly lacking, and I've messed with offlineimap before, but found it a bit too fiddly. Anyway, I thought quicklook would be a nice way to view the many highly important images I often get in my email, as it pops up quickly, and doesn't require an application switch. A quick google scared up the 'qlmanage' utility, and I wrote a quick wrapper script to provide mutt with a 0 exit status instead of the 130 that qlmanage spits out. (ummm, whatever, apple) This prevents mutt from spitting out the 'press any key to continue' message and requiring an EXTRA KEYSTROKE. (picky, picky...)

  1. #!/bin/bash
  2. QLFILE=$1
  3.  
  4. # we have to trap ctrl-c so that a successful exit signal will be given,
  5. # so that mutt won't prompt us to press any key to continue
  6. trap 'exit 0' 2 #traps Ctrl-C (signal 2)
  7.  
  8. qlmanage -p $QLFILE >& /dev/null

A little adjustment in ~/.mailcap, and away you go... Here's an example of one of the very important images that it's vital I see in my email:

Comments

I know you didn't like using X11 tunneled over SSH, but try again using the image viewer "feh". http://linuxbrit.co.uk/software/feh/ It seems to be designed for this purpose - lightweight but flexable, using imlib2 instead of gtk or qt.


I know you didn't like using X11 tunneled over SSH, but try again using the image viewer "feh". http://linuxbrit.co.uk/software/feh/ It seems to be designed for this purpose - lightweight but flexable, using imlib2 instead of gtk or qt.


I know you didn't like using X11 tunneled over SSH, but try again using the image viewer "feh", at linuxbrit.co.uk/software/feh/ It seems to be designed for this purpose - lightweight but flexable, using imlib2 instead of gtk or qt.


Add new comment

The content of this field is kept private and will not be shown publicly.
By submitting this form, you accept the Mollom privacy policy.