0

When there is new mail in the current directory, mutt will notify the user by displaying "New mail in this mailbox".

How do I make this notification brightyellow and blinking?

  • you tagged both Linux and BSD; does the solution need to cover both, or is this mutt-specific? – Jeff Schaller Oct 18 '16 at 17:59
  • sorry, this is a mutt-specific question – matzus Oct 18 '16 at 18:10
0

short: you can't

long:

mutt writes this message with a common function that is shared with many other messages (147 according to a grep on mutt 1.7.1). Inside the function (curses_message, in curs_lib.c), it has colors for the ordinary messages and for error messages. These are message and error categories, respectively.

Without modifying mutt's source-code and recompiling, you would not be able to make this notification appear distinct from other messages.

You can modify the colors for a category, as done in Can mutt set the color of some messages in the inbox? for the index category. But all of the messages in that category would have the same colors.

Also, you cannot have blink. Mutt does not look for that attribute. For reference, here is the code that it uses to get curses attributes:

  if (ascii_strcasecmp ("bold", buf->data) == 0)
    *attr |= A_BOLD;
  else if (ascii_strcasecmp ("underline", buf->data) == 0)
    *attr |= A_UNDERLINE;
  else if (ascii_strcasecmp ("none", buf->data) == 0)
    *attr = A_NORMAL;
  else if (ascii_strcasecmp ("reverse", buf->data) == 0)
    *attr |= A_REVERSE;
  else if (ascii_strcasecmp ("standout", buf->data) == 0)
    *attr |= A_STANDOUT;
  else if (ascii_strcasecmp ("normal", buf->data) == 0)
    *attr = A_NORMAL; /* needs use = instead of |= to clear other bits */
  else
  { 
    snprintf (err->data, err->dsize, _("%s: no such attribute"), buf->data);
    return (-1);
  }

So blink would be reported as

blink: no such attribute

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.