[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RP] useful .ratpoisonrc one-liner?
From: |
John Arundel |
Subject: |
[RP] useful .ratpoisonrc one-liner? |
Date: |
Thu Oct 24 06:49:12 2002 |
User-agent: |
Mutt/1.3.28i |
Apologies if this is too off-topic, but maybe useful one-liners could go
in a sample .ratpoisonrc (or on Jonathan's excellent sample
configuration webpage)...?
I use the following to check if new mail has arrived, being so addicted
to RP that I've thrown away all those little graphical mailbox applets
;)
alias newmail exec ratpoison -c "echo $(expr $(grep -c "^From " $MAIL) - $(grep
-c "^Status: .*O" $MAIL)) new message(s)"
The sense of which is to count the number of messages in the mail spool,
count the number with an 'O' status flag and subtract one from the
other. This works with Mutt and ought to work with most mailers that set
the status flags appropriately.
If I've missed a simpler way to do it (highly likely) or if anyone else
has nice macros in a similar vein, do let me know.
Regards
John
PS There's probably a more intelligent RE to match real From lines
instead of just lines that happen to start with 'From'...
--
"It is not enough to be a good player; you must also play well."
- Tarrasch
---------------------------------------------------------------------
I prefer encrypted mail - http://www.splange.freeserve.co.uk/pgp.html
---------------------------------------------------------------------