This allows us to use alert$colorname as a neomutt color.
Example usage:
color header alertred default "^(x-mailer): .*apple|.*iphone"
static int parse_color_name(const char *s, int *col, int *attr, int is_fg, struct Buffer *err)
{
char *eptr = NULL;
- int is_bright = 0;
+ int is_alert = 0, is_bright = 0;
if (mutt_str_strncasecmp(s, "bright", 6) == 0)
{
is_bright = 1;
s += 6;
}
+ else if (mutt_str_strncasecmp(s, "alert", 5) == 0)
+ {
+ is_alert = 1;
+ is_bright = 1;
+ s += 5;
+ }
/* allow aliases for xterm color resources */
if (mutt_str_strncasecmp(s, "color", 5) == 0)
if (is_bright)
{
- if (is_fg)
+ if (is_alert)
+ {
+ *attr |= A_BOLD;
+ *attr |= A_BLINK;
+ }
+ else if (is_fg)
{
*attr |= A_BOLD;
}
<emphasis>foreground</emphasis> can optionally be prefixed with the
keyword
<literal>bright</literal> to make the foreground color boldfaced (e.g.,
- <literal>brightred</literal>).</para>
+ <literal>brightred</literal>).
+ <literal>alert</literal> to make a blinking/alert color (e.g.,
+ <literal>alertred</literal>).</para>
<para>If your terminal supports it, the special keyword
<emphasis>default</emphasis> can be used as a transparent color. The value
<emphasis>brightdefault</emphasis> is also valid. If NeoMutt is linked