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)
Indentation is odd because there's a mix of tabs and spaces, if you open
this in vim it will visually look fine. We could convert the whole
codebase to be spaces only (if we really want that).

On (Sep-11-14| 7:57), 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);
> > +        mutt_system(cmd);
> > +      }
> 
> Indentation looks kinda odd here.
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/ElDeveloper/mutt/pull/2/files#r17425646