Re: mutt in GNU Screen - new email indicator
- To: mutt-users@xxxxxxxx
- Subject: Re: mutt in GNU Screen - new email indicator
- From: SK <sk.list@xxxxxxxxx>
- Date: Fri, 11 Apr 2008 13:47:54 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=wLXDoo2w+hNDNa6b9sNYRfSjxEdejcKu9vtx/MJYl6k=; b=kLex0EdTWuMHnpP76IitYhkthKP+wMZ5bjghdd1HYwAOKH/UG8ewtMjecvXUy6RGMXYGoed5xXKUXp9p284EjPCW/5THKC8ae16RzBW+ff9tE8C/weJPPgvpu9fa4JZiXKYmkSxntf9EwBy68utxbr/MjMqocZZ9LhUjsdkH/JA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=BRWt1Z8Ai0fvLea50aWdr9yw7g/IjJVT3fodqdWDS88x7VlQqwzckgbVAPYJVrAw8MPW9g56T+poO8KRQfvU+hEGjvRextMKH6gn98+I8FUA3B4m1a/r9VBJLDaUmSsig1IR2tUy2vfFfoFTy2KqIq/RS4TLAV1b77cns09k9GE=
- In-reply-to: <6ca73f650804102300j44a7a278n235e77d313ade845@xxxxxxxxxxxxxx>
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- References: <6ca73f650804102300j44a7a278n235e77d313ade845@xxxxxxxxxxxxxx>
- Sender: owner-mutt-users@xxxxxxxx
To answer my own question, one needs to use the 'status_format' setting.
I have called it like this:
set status_format="/home/sk/scripts/mutt_newmail '-%r-%v:........... '|"
and the mutt_newmail script is as follows:
#!/bin/sh
if [[ "$1" =~ "New:" ]]
then
printf "\033kmutt: new\033\\" > /dev/tty
else
printf "\033kmutt\033\\" > /dev/tty
fi
echo "$1"
The only outstanding problem is that this works only if a new mail
arrives in the currently selected mailbox. If it arrives in another
mailbox, the status bar does not get updated and hence the script is
not called.
Anyone knows a better way?
-sk-
On Fri, Apr 11, 2008 at 8:00 AM, SK <sk.list@xxxxxxxxx> wrote:
> Hi all,
>
> I am running mutt in GNU Screen. Is there any way to change the
> 'name' of the mutt screen in the screen statusbar when a new email
> arrives to indicate the total number of new emails?
>
> Regards,
> SK
>