Получаем нотификашки о новом спаме в любимый десктоп из любимого mutt:
∞ cat mutt-notify-send.patch
--- curs_main.c 2014-09-05 19:30:37.578096061 +0400
+++ curs_main.c 2014-09-05 19:37:02.549530283 +0400
@@ -401,6 +401,12 @@
menu->redraw = REDRAW_INDEX | REDRAW_STATUS;
}
+static void notifynew() {
+ if (option (OPTBEEPNEW))
+ beep ();
+ system("notify-send -a mutt -c mail 'new mail have arrived'");
+}
+
static const struct mapping_t IndexHelp[] = {
{ N("Quit"), OPQUIT },
{ N("Del"), OP_DELETE },
@@ -496,8 +502,7 @@
else if (check == M_NEW_MAIL)
{
mutt_message _("New mail in this mailbox.");
- if (option (OPTBEEPNEW))
- beep ();
+ notify_new();
} else if (check == M_FLAGS)
mutt_message _("Mailbox was externally modified.");
@@ -519,8 +524,8 @@
menu->redraw |= REDRAW_STATUS;
if (do_buffy_notify)
{
- if (mutt_buffy_notify () && option (OPTBEEPNEW))
- beep ();
+ if (mutt_buffy_notify ())
+ notify_new();
}
else
do_buffy_notify = 1;