Add new_command setting

new_command will get executed when the current mailbox receives new
mail. Two values are formatted into this string, the first is the number
of new messages and the second the number of unread messages.

If this value is not set, no command is executed.

---------------------

This is how my muttrc file looks:

     set new_command="notifier --title 'Mutt' --subtitle 'New Mail' --message '%d new messages, %d unread.'"

You can find notifier [here](https://gist.github.com/ElDeveloper/f7e8b19aff23550af426).

--------------------

See animated gif:

![mutt-demo](https://cloud.githubusercontent.com/assets/375307/4230044/1c4dc3a4-397d-11e4-84ae-b4d1073c8d0c.gif)
Yes, you are right, will change.

On (Sep-11-14| 8:12), Santiago Torres wrote:
> > @@ -575,6 +575,12 @@ int mutt_index_menu (void)
> >  	  mutt_message _("New mail in this mailbox.");
> >  	  if (option (OPTBEEPNEW))
> >  	    beep ();
> > +      if (NewCmd)
> > +      {
> > +        char cmd[strlen(NewCmd)];
> > +        sprintf(cmd, NewCmd, Context->new, Context->unread);
> 
> Maybe snprintf would be a better choice...
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/ElDeveloper/mutt/pull/2/files#r17426679