This setting allows to run any external program to e.g. produce a
notification on the desktop when Mutt finds new mail.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
mutt_message _("New mail in this mailbox.");
if (option (OPTBEEPNEW))
beep ();
+ if (NewMailCmd)
+ {
+ char cmd[LONG_STRING];
+ menu_status_line(cmd, sizeof(cmd), menu, NONULL(NewMailCmd));
+ mutt_system(cmd);
+ }
} else if (check == MUTT_FLAGS)
mutt_message _("Mailbox was externally modified.");
menu->redraw |= REDRAW_STATUS;
if (option (OPTBEEPNEW))
beep();
+ if (NewMailCmd)
+ {
+ char cmd[LONG_STRING];
+ menu_status_line(cmd, sizeof(cmd), menu, NONULL(NewMailCmd));
+ mutt_system(cmd);
+ }
}
}
else
WHERE char *PostponeEncryptAs;
WHERE char *Prefix;
WHERE char *PrintCmd;
+WHERE char *NewMailCmd;
WHERE char *QueryCmd;
WHERE char *QueryFormat;
WHERE char *Realname;
** See also $$read_inc, $$write_inc and $$net_inc.
*/
#endif
+ { "new_mail_command", DT_PATH, R_NONE, UL &NewMailCmd, UL NULL },
+ /*
+ ** .pp
+ ** If \fIset\fP, Mutt will call this command after a new message is received.
+ ** See the $$status_format documentation for the values that can be formatted
+ ** into this command.
+ */
{ "pager", DT_PATH, R_NONE, UL &Pager, UL "builtin" },
/*
** .pp