From: Richard Russon Date: Fri, 4 Oct 2019 17:59:41 +0000 (+0100) Subject: docs: color/uncolor X-Git-Tag: 2019-10-25~13^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7f31fec1a00f458be2d09fd52f428b5c67b7bf2c;p=neomutt docs: color/uncolor --- diff --git a/doc/manual.xml.head b/doc/manual.xml.head index 165df9a92..ddd58d1e4 100644 --- a/doc/manual.xml.head +++ b/doc/manual.xml.head @@ -4616,6 +4616,9 @@ folder-hook work "set sort=threads" color + + + object @@ -4629,14 +4632,9 @@ folder-hook work "set sort=threads" background color - - - - - - - - + + pattern-object + attribute @@ -4647,11 +4645,11 @@ folder-hook work "set sort=threads" background - regex + pattern color - + regex-object attribute @@ -4663,14 +4661,11 @@ folder-hook work "set sort=threads" background - pattern + regex color - - - - composeobject + attribute @@ -4681,564 +4676,715 @@ folder-hook work "set sort=threads" background + + + regex + + + + num + + + + uncolor + + + + + object + uncolor + + pattern-object + - + pattern + + + * + + uncolor + + regex-object + + - + regex - + * + uncolor + + + - * + regex - - pattern + + * If your terminal supports color, you can spice up NeoMutt by creating - your own color scheme. To define the color of an object (type of - information), you must specify both a foreground color - and a background color (it is not possible to only - specify one or the other). - - - header and body match - regex in the header/body of a message, - index-object can match - pattern (see ) in the - message index. Note that IMAP server-side searches (=b, =B, =h) are not - supported for color index patterns. - - - When $header_color_partial - is unset (the default), a header matched by - regex will have color applied to the entire - header. When set, color is applied only to the exact text matched by - regex. + your own color scheme. - These simple colours below don't use a pattern. - If a name is configured more than once, the last one will be used. + The types of objects that can be colored fall into two categories: + Simple Colors such as the + highlight in the index, and Color Lists + such as the status bar. These lists can created complexing coloring + rules. + + + Color Style + + Objects in NeoMutt can be given colors and attributes to make things + easier to find and use. + + + + Objects must be given both a foreground and + background color (it is not possible to specify one or the other). + + + + Colors can be specified in two ways, using their name + such as green, blue, + or by their number in the palette, + such as color12, color207 + (the palette consists of 256 colors). + + + Named colours may also be prefixed by a modifier. + bright or light will make the + color boldfaced or light (e.g., brightred). + alert to make a blinking/alert color (e.g., + alertred). + + + The precise behavior depends on the terminal and its configuration. + In particular, the boldfaced/light difference and such background + colors may be available only for terminals configured with at least + 16 colors, as specified by the $TERM + environment variable. + + + foreground and background + can be one of the following: + + + + + white + + + + + black + + + + + green + + + + + magenta + + + + + blue + + + + + cyan + + + + + yellow + + + + + red + + + + + default + + + + + In addition to the colors, objects may have their attributes set: + + + + none + + + bold + + + reverse + + + standout + + + underline + + + + If your terminal supports it, the special keyword + default can be used as a transparent color. The + value brightdefault is also valid. If NeoMutt is + linked against the S-Lang library, you also need + to set the $COLORFGBG environment variable to the + default colors of your terminal for this to work; for example (for + Bourne-like shells): + + +set COLORFGBG="green;black" +export COLORFGBG + + + + The S-Lang library requires you to use the + lightgray and brown + keywords instead of white and + yellow when setting this variable. + + + + + + Simple Colors + + Most of NeoMutt's colorable objects follow simple rules. + They don't use a pattern and any new configuration will overwrite the + old colours. + + + Simple colors can be undone by setting the foreground and background + to default, or by using the uncolor + command. + + + These are general NeoMutt objects: + + + Simple Colours + + + + Colour Name + Description + + + + + attachment + Colour for attachment headers + + + bold + Highlighting bold patterns in the body of messages + + + error + Error messages printed by NeoMutt + + + hdrdefault + Default colour of the message header in the pager + + + indicator + Arrow or bar used to indicate the current item in a menu + + + markers + The "+" markers at the beginning of wrapped lines in the pager + + + message + Informational messages + + + normal + Default colour for all text + + + options + The key letters in multi-choice questions + + + progress + Visual progress bar + + + prompt + A question + + + search + Highlighting of words in the pager + + + signature + Email's signature lines (.sig) + + + tilde + The "~" used to pad blank lines in the pager + + + tree + Thread tree drawn in the message index and attachment menu + + + underline + Highlighting underlined patterns in the body of messages + + + warning + Warning messages + + + +
# Make error messages white text on a red background color error white red # Make questions bold, underlined, with light blue text (with default background) color prompt bold underline cyan default - - Simple Colours - - - - Colour Name - Description - - - - - attachment - Colour for attachment headers - - - bold - Highlighting bold patterns in the body of messages - - - error - Error messages printed by NeoMutt - - - hdrdefault - Default colour of the message header in the pager - - - indicator - Arrow or bar used to indicate the current item in a menu - - - markers - The "+" markers at the beginning of wrapped lines in the pager - - - message - Informational messages - - - normal - Default colour for all text - - - options - The key letters in multi-choice questions - - - progress - Visual progress bar - - - prompt - A question - - - search - Highlighting of words in the pager - - - signature - Email's signature lines (.sig) - - - tilde - The "~" used to pad blank lines in the pager - - - tree - Thread tree drawn in the message index and attachment menu - - - underline - Highlighting underlined patterns in the body of messages - - - -
- - These simple index colours below don't use a pattern. - If a name is configured more than once, the last one will be used. - Each name will colour a certain expando in the index. - See $index_format for more details. - -color index_date green default +uncolor error +uncolor prompt - - Simple Index Colours - - - - Colour Name - Description - - - - - index_collapsed - Number of messages in a collapsed thread, %M - - - index_date - Date field, %d %D %{fmt} %[fmt] %(fmt) - - - index_label - Message label, %y %Y - - - index_number - Message number, %C - - - index_size - Message size, %c %l - - - index_tags - Transformed message tags, %g %J - - - -
- - These simple sidebar colours below don't use a pattern. - If a name is configured more than once, the last one will be used. - See Sidebar Intro for more details. - + + Each of these objects will colour a certain expando in the index. + See $index_format for more details. + + + Simple Index Colours + + + + Colour Name + Description + + + + + index_collapsed + Number of messages in a collapsed thread, %M + + + index_date + Date field, %d %D %{fmt} %[fmt] %(fmt) + + + index_label + Message label, %y %Y + + + index_number + Message number, %C + + + index_size + Message size, %c %l + + + index_tags + Transformed message tags, %g %J + + + +
+ +color index_date green default + + +uncolor index_date + + + These are sidebar objects. + See Sidebar Intro for more details. + + + Simple Sidebar Colours + + + + Colour Name + Description + + + + + sidebar_divider + The dividing line between the Sidebar and the Index/Pager panels + + + sidebar_flagged + Mailboxes containing flagged mail + + + sidebar_highlight + Cursor to select a mailbox + + + sidebar_indicator + The mailbox open in the Index panel + + + sidebar_new + Mailboxes containing new mail + + + sidebar_ordinary + Mailboxes that have no new/flagged mails, etc + + + sidebar_spoolfile + Mailbox that receives incoming mail + + + +
color sidebar_divider brightblack default - - Simple Sidebar Colours - - - - Colour Name - Description - - - - - sidebar_divider - The dividing line between the Sidebar and the Index/Pager panels - - - sidebar_flagged - Mailboxes containing flagged mail - - - sidebar_highlight - Cursor to select a mailbox - - - sidebar_indicator - The mailbox open in the Index panel - - - sidebar_new - Mailboxes containing new mail - - - sidebar_ordinary - Mailboxes that have no new/flagged mails, etc - - - sidebar_spoolfile - Mailbox that receives incoming mail - - - -
- - These simple compose colours below don't use a pattern. - If a name is configured more than once, the last one will be used. - -color header bold white default +uncolor sidebar_divider - - Simple Compose Colours - - - - Colour Name - Description - - - - - header - Header labels, e.g. From: - - - security_encrypt - Mail will be encrypted - - - security_sign - Mail will be signed - - - security_both - Mail will be encrypted and signed - - - security_none - Mail will not be encrypted or signed - - - -
- - These colours use a regex to match. When applying the colours, each - regex will be tested against the field to be coloured. All of the - matching patterns will have their colours applied in the order they are - configured. - + + These are compose objects. + + + + The compose objects use a slightly different format of command. + They prefix the style with the word compose. + + + + Simple Compose Colours + + + + Colour Name + Description + + + + + header + Header labels, e.g. From: + + + security_encrypt + Mail will be encrypted + + + security_sign + Mail will be signed + + + security_both + Mail will be encrypted and signed + + + security_none + Mail will not be encrypted or signed + + + +
-color body bold red default "(urgent|important)" +color compose header bold white default - - Colour Regex Lists - - - - Colour Name - Description - - - - - attach_headers - Attachment headers - - - body - Email body - - - header - Email headers - - - index - Default highlighting of the entire index line - - - index_author - Author in the index, %A %a %F %L %n - - - index_flags - Flags in the index, %S %Z - - - index_subject - Subject in the index, %s - - - index_tag - Tags in the index, %G - - - status - Status bar - - - -
- - The quoted email colours don't use pattern. - The first colour, quoted provides a default colour for - all quoted text. Also, each diffent level of quoting can be given a - different colour using, quoted1, - quoted2, quoted3 etc. - + +uncolor compose header + + + The quoted objects refer to quoted lines in an email reply. + They are defined using the + $reply_regex + config variable. + + + The quoted email colours don't use pattern. + The first colour, quoted provides a default colour + for all quoted text. Also, each diffent level of quoting can be given + a different colour using, quoted1, + quoted2, quoted3 etc. + + + Quoted Email Colours + + + + Colour Name + Description + + + + + quoted + Text matching $quote_regex in the body of a message + + + quoted1 + 1 level deeper quoted text, e.g. > > text + + + quoted2 + 2 level deeper quoted text, e.g. > > > text + + + quotedN + n level deeper quoted text + + + +
color quoted brightblue default color quoted1 brightgreen default color quoted2 yellow default - - Quoted Email Colours - - - - Colour Name - Description - - - - - quoted - Text matching $quote_regex in the body of a message - - - quoted1 - 1 level deeper quoted text, e.g. > > text - - - quoted2 - 2 level deeper quoted text, e.g. > > > text - - - quotedN - n level deeper quoted text - - - -
- - attribute can be one of the following: - - - - none - - - bold - - - underline - - - reverse - - - standout - - - - foreground and background can - be one of the following: - - - - - white - - - - - black - - - - - green - - - - - magenta - - - - - blue - - - - - cyan - - - - - yellow - - - - - red - - - - - default - - - - - color - x - - - - - The color name can optionally be prefixed with the keyword - bright or light to make the color - boldfaced or light (e.g., brightred). - alert to make a blinking/alert color (e.g., - alertred). The precise behavior depends on the - terminal and its configuration. In particular, the boldfaced/light - difference and such background colors may be available only for - terminals configured with at least 16 colors, as specified by the - $TERM environment variable. - - - If your terminal supports it, the special keyword - default can be used as a transparent color. The - value brightdefault is also valid. If NeoMutt is - linked against the S-Lang library, you also need - to set the $COLORFGBG environment variable to the - default colors of your terminal for this to work; for example (for - Bourne-like shells): - - -set COLORFGBG="green;black" -export COLORFGBG +uncolor quoted +uncolor quoted1 +uncolor quoted2 +
- + + Color Lists - The S-Lang library requires you to use the - lightgray and brown - keywords instead of white and - yellow when setting this variable. + Some objects in NeoMutt support lists of color + rules. Each rule has a pattern and a color. + Each is checked in turn + and any matching rules are applied cumulatively (overlaid). - - - The uncolor command can be applied to the index, - header and body objects only. It removes entries from the list. You - must specify the same pattern specified in the - color command for it to be removed. The pattern - * is a special token which means to clear the color - list of all entries. + When applying the colours, each pattern will be tested against the + field to be colored. All of the matching patterns will have their + colors applied in the order they are configured. - - - NeoMutt also recognizes the keywords color0, - color1, ..., color - N-1 (N being the number of - colors supported by your terminal). This is useful when you remap the - colors for your display (for example by changing the color associated - with color2 for your xterm), since color names may - then lose their normal meaning. - - - - If your terminal does not support color, it is still possible change - the video attributes through the use of the mono - command. Usage: - - - mono - - object - - - attribute - - mono - + + The color lists work in slightly different ways to each other. + + + attach_headers, body and + header match a regular expression + (regex) in the header/body of a email. + + + index objects match a pattern + in the email index (see ) + Note that IMAP server-side searches (=b, =B, =h) are not + supported for color index patterns. + + + When $header_color_partial + is unset (the default), a header matched by + regex will have color applied to the entire + header. When set, color is applied only to the exact text matched by + regex. + + + For the status list, the + regular expression is optional. Without one, + the command will set the default style for the status bar. With a + regex (and an optional number), it's possible to style parts of the + status bar. See: Status-Color feature + for more detail. + + + Color lists can be undone by using the uncolor + command and the pattern or * to match. + + + Colour Regex Lists + + + + Colour Name + Match + Description + + + + + attach_headers + regex + Attachment headers + + + body + regex + Email body + + + header + regex + Email headers + + + index + pattern + Default highlighting of the entire index line + + + index_author + pattern + Author in the index, %A %a %F %L %n + + + index_flags + pattern + Flags in the index, %S %Z + + + index_subject + pattern + Subject in the index, %s + + + index_tag + pattern + Tags in the index, %G + + + status + regex + Status bar + + + +
+ +# Highlight emails from work (entire line) +color index cyan default "~f @work.com" +# Extra highlighting for the boss (just the author column) +color index_author cyan red "~f boss@work.com" + + +uncolor index "~f @work.com" +# Clear all index_author colors +uncolor index_author * + + +# Add some highlights to the body of an email +color body bold red default "(urgent|important)" +color body yellow default "(warning|notice)" +# Make the label header red +color header cyan default "X-Label" + + +uncolor body "(urgent|important)" +# Clear all body colors +uncolor body * +uncolor header "X-Label" + + +# Set the default color for the entire status line +color status blue white +# Highlight New, Deleted, or Flagged emails +color status brightred white '(New|Del|Flag):[0-9]+' +# Highlight the contents of the []s but not the [] themselves +color status red default '\[([^]]+)\]' 1 + + +uncolor status '(New|Del|Flag):[0-9]+' +uncolor status * + + + + + Mono Color + + + If your terminal does not support color, it is still possible change + the video attributes through the use of the mono + command. Usage: + + + mono - + object - + attribute -
- - attribute - - - regex - - mono - - - - - attribute - - - pattern - - unmono - + mono + + + + + + + + - + attribute - + regex + mono - + - - - * + attribute - - pattern + + pattern - -
- - For object, composeobject, and - attribute, see the color command. - + unmono + + + + + + + + + + + + + + * + + + pattern + + + + + For object, composeobject, and + attribute, see the color command. + + @@ -19118,7 +19264,7 @@ neomutt mailto:some@one.org?subject=test&cc=other@one.org - mono + mono object @@ -19127,7 +19273,7 @@ neomutt mailto:some@one.org?subject=test&cc=other@one.org attribute - mono + mono @@ -19144,7 +19290,7 @@ neomutt mailto:some@one.org?subject=test&cc=other@one.org regex - mono + mono @@ -19156,7 +19302,7 @@ neomutt mailto:some@one.org?subject=test&cc=other@one.org pattern - unmono + unmono