Peter Vollmar --> dwm (2008-01-09 23:05:49 +0100):
> Hi everybody,
> Following the discussion earlier in December I've found a good solution
> with 'fetchmail -c' showing the number of new messages in the status bar. The code copied from Martin Sander's comment is:
>
> fetchmail -c|sed 's/(//'|awk '{print $1-$3}'
> 1
Hmm, this doesn't really work if you configure fetchmail to check more
than one folder... And, BTW: if you use more than one of grep, sed and
awk in a single pipline, you have almost always done something wrong
;-)
> The problem is that fetchmail accesses the mail server as often as the
> other services in the status bar are accessed - usually every few
> seconds, which is unnecessarily often for imap! I've changed it to 60
> seconds, which is about the lowest reasonable for the 'date' and 'uptime'. Is
> there anything we can do about this?
Run all commands except fetchmail every n seconds in a loop as you
already do, and fetchmail only every m loop iterations. Thus fetchmail
will be executed only every mn seconds.
HTH, Jukka
-- bashian roulette: $ ((RANDOM%6)) || rm -rf ~Received on Thu Jan 10 2008 - 13:26:21 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:15:25 UTC