AERC-STYLESETS(7)
π¦ AERC-STYLESETS(7) π¦
bestie, welcome to the aerc-stylesets page from the Miscellaneous Information Manual β it's the styleset file spec for aerc(1), and we're gonna make it cute while keeping every single fact intact π
πΈ NAME πΈ
aerc-stylesets β styleset file specification for aerc(1).
β¨ SYNOPSIS β¨
okay so aerc uses a simple configuration syntax to configure the styleset for its ui.
π STYLESET CONFIGURATION π
the styleset is described as <object>.<attribute> = <value> pairs. yes, that's the whole vibe: object, dot, attribute, equals, value π
for example, in the line below, the foreground color of the style object msglist_unread is set to cornflowerblue:
msglist_unread.fg = cornflowerblue
the configuration also allows wildcard matching of the keys to configure multiple style objects at a time. so you can style a whole little squad of objects without typing every single key, periodt β¨
π₯ ATTRIBUTES π₯
the following options are available to be modified for each of the style objects. every single one is here, no skipping:
<object>.fg = <color>β sets the foreground color of the style object.<object>.bg = <color>β sets the background color of the style object.<object>.bold = true|false|toggleβ sets/unset the bold attribute of the style object.<object>.blink = true|false|toggleβ sets/unset the blink attribute of the style object. your terminal needs to support blinking text, bestie.<object>.underline = true|false|toggleβ sets/unset the underline attribute of the style object. your terminal needs to support underline text.<object>.italic = true|false|toggleβ sets/unset the italic attribute of the style object. your terminal needs to support italic text.<object>.dim = true|false|toggleβ sets/unset the dim attribute of the style object. your terminal needs to support half-bright text.<object>.reverse = true|false|toggleβ reverses the color of the style object. exchanges the foreground and background colors. if the value isfalse, it doesn't change anything.<object>.normal = trueβ all the attributes of the style object are unset. the value doesn't matter.<object>.default = trueβ sets the style object to the default style of the context. usually based on the terminal. the value doesn't matter.
π STYLE OBJECTS π
the style objects represent the various ui elements or ui instances for styling. that's the whole section: these are the things you point your style keys at, iykyk π
okay so here's the full roster of style objects, bestie β this is the whole cast of characters, no skips, no "you'll figure it out" π
defaultβ the default style object, the one doing all the heavy lifting for normal ui elements whenever you haven't set up something specialized. the main character of fallbacks πerrorβ the style used to show errors π¨warningβ the style used when showing warnings β οΈsuccessβ the style used for success messages β¨titleβ the style object used to style titles in ui elements πheaderβ the style object used to style headers in ui elements πΈrealnameβ the style object used to style real name(s) in the email fields in the header section of the message viewer π«Άemailβ the style object used to style email(s) in the email fields in the header section of the message viewer πsubjectβ the style object used to style subject in the header section of the message viewer βdateβ the style object used to style date in the header section of the message viewer ποΈstatusline_defaultβ the default style applied to the statusline π«statusline_errorβ the style used for error messages in statusline πstatusline_successβ the style used for success messages in statusline πmsglist_defaultβ the default style for messages in a message list π¬msglist_unreadβ unread messages in a message list π₯msglist_readβ read messages in a message list πmsglist_flaggedβ the messages with the flagged flag π©msglist_deletedβ the messages marked as deleted ποΈmsglist_markedβ the messages with the marked flag βmsglist_resultβ the messages which match the current search πmsglist_answeredβ the messages marked as answered βοΈmsglist_forwardedβ the messages marked as forwarded β‘οΈmsglist_gutterβ the message list gutter (the lil side strip, iykyk) πmsglist_pillβ the message list scrollbar πmsglist_thread_foldedβ visible messages that have folded thread children π§΅msglist_thread_contextβ the messages not matching the mailbox / query, displayed for context πmsglist_thread_orphanβ threaded messages that have a missing parent message π’dirlist_defaultβ the default style for directories in the directory list πdirlist_unreadβ the style used for directories with unread messages πdirlist_recentβ the style used for directories with recent messages π¦part_switcherβ background for the part switcher in the message viewer π§part_filenameβ attachment file name in the part switcher πpart_mimetypeβ attachment/part MIME type in the part switcher π·οΈ
like, literally one per vibe, no notes π
okay so the style-object roster keeps going and honestly? iconic lineup π
completion_defaultβ The default style for the completion engine.completion_descriptionβ Completion item descriptions.completion_gutterβ The completion gutter.completion_pillβ The completion pill.tabβ The style for the tab bar.stackβ The style for ui stack element.spinnerβ The style for the loading spinner.borderβ The style used to draw borders (only the bg color is used unless you customizeborder-char-verticaland/orborder-char-horizontalinaerc.conf).selector_defaultβ The default style for the selector ui element.selector_focusedβ The focused item in a selector ui element.selector_chooserβ The item chooser in a selector ui element.keyhint_defaultβ The default style for the keyhint popup background.keyhint_keyβ The style for the key column in the keyhint popup.keyhint_descβ The style for the description column in the keyhint popup.
These next style objects only affect the built-in colorize filter and must be declared under a [viewer] section of the styleset file. no cap, that [viewer] part is lowkey important π«Ά
urlβ URLs.headerβ RFC-822-like header names.signatureβ Email signatures.diff_metaβ Patch diff meta lines.diff_chunkβ Patch diff chunks.diff_chunk_funcβ Patch diff chunk function names.diff_addβ Patch diff added lines.diff_delβ Patch diff deleted lines.diff_whitespaceβ Patch diff trailing whitespace.quote_1β First level quoted text.quote_2β Second level quoted text.quote_3β Third level quoted text.quote_4β Fourth level quoted text.quote_xβ Above fourth level quoted text.codeβ Code blocks fenced by ``` and inlinecode.
User defined styles can be used to style arbitrary strings in go-templates (see .Style in aerc-templates(7)). User styles must be defined in the [user] ini section. Styles can be referenced by their name (e.g. red.fg is named "red").
Example:
[user]
red.fg=red
User styles are layered with other styles applied to the context in which they are rendered. The user style colors (fg and/or bg) will only be effective if the context style does not define any. Other boolean attributes will be merged with the underlying style boolean attributes. itβs giving βteamwork makes the dream workβ tbh β¨
For example, if the context style is:
fg=red bold
And the inline style is:
fg=yellow italic underline
The effective style will be:
fg=red bold italic underline
π FNMATCH STYLE WILDCARD MATCHING π
The styleset configuration can be made simpler by using the fnmatch style wildcard matching for the style object. bestie, this is your shortcut era π
The special characters used in the fnmatch wildcards are:
*β Matches everything?β Matches any single character
For example, the following wildcards can be made using this syntax.
*.fg = blueβ Set the foreground color of all style objects to blue.*list.bg = hotpinkβ Set the background color of all style objects that end in list to hotpink.
Note that the statements in a given styleset are parsed in the order in which they are written. That means that with the following styleset:
msglist_marked.fg = pink
msglist_*.fg = white
The msglist_marked.fg attribute will be set to white. order matters, always has, always will π
π SELECTED MODIFIER
okay so the selected modifier is that girl who can show up to literally any party β it can be applied to any style object, no cap. The style you hand it gets layered on top of the style object it corresponds to. like a little accessory on the fit β¨
say you want messages flagged as read in the msglist to pop with a yellow foreground and black background? you literally just write:
msglist_default.selected.fg = yellow
msglist_default.selected.bg = black
and if we set the global style selected modifier using fnmatch, like this:
*.selected.reverse = toggle
then that toggles the reverse switch for the selected version of all the style objects at once. one line, every style, iconic behavior fr π«Ά
here's the tea on inheritance tho: selected objects inherit from all the attributes of their non-selected counterparts. selected statements are parsed after the non-selected ones, and they effectively override the attributes of the non-selected style object. so yeah, they get the last word π
π§ LAYERED STYLES
some styles β currently the msglist_* and dirlist_* ones β get applied in layers. if a style differs from the base (in this case *list_default) then that style applies, unless something higher up the stack overrides it. and if fg and bg colors aren't defined explicitly (or they're defined to the default color), they're considered "transparent" and the colors from the lower layer get used instead. it's giving sheer fabric over a solid base, lowkey genius πΈ
the order that msglist_* styles are applied in is, from first to last:
msglist_defaultmsglist_unreadmsglist_readmsglist_answeredmsglist_forwardedmsglist_flaggedmsglist_deletedmsglist_resultmsglist_thread_foldedmsglist_thread_contextmsglist_thread_orphanmsglist_marked
so yeah β the marked style will override all other msglist styles. main character energy, honestly π
the order for dirlist_* styles is:
dirlist_defaultdirlist_unreaddirlist_recent
β¨ DYNAMIC MESSAGE LIST STYLES
this is where it gets good. all msglist_* styles can be defined for specific email header values. the syntax is:
msglist_<name>.<header>,<header_value>.<attribute> = <attr_value>
if <header_value> starts with a tilde character ~, it gets interpreted as a regular expression. and bestie, listen β if you're writing regular expressions that try to match with . or \. you need to wrap like this: ~/<expression>/. don't ask, just do it π
<header>,<header_value> can be specified multiple times to narrow down matches to more than one email header value. in that case, all the given headers must match for the dynamic style to apply. every single one. no partial credit π
examples:
msglist*.X-Sourcehut-Patchset-Update,APPROVED.fg = green
msglist*.X-Sourcehut-Patchset-Update,NEEDS_REVISION.fg = yellow
msglist*.X-Sourcehut-Patchset-Update,REJECTED.fg = red
"msglist_*.Subject,~^(\[[w-]+]\s*)?\[(RFC )?PATCH.fg" = #ffffaf
"msglist_*.Subject,~^(\[[w-]+]\s*)?\[(RFC )?PATCH.selected.fg" = #ffffaf
"msglist_*.From,~^Bob.Subject,~^(\[[w-]+]\s*)?\[(RFC )?PATCH.selected.fg" = #ffffaf
"msglist_*.List-ID,~/lists\.sr\.ht/selected.fg" = blue
when a dynamic style gets matched to an email header, it's used in priority compared to its non-dynamic counterpart. so like, provided this styleset:
msglist_marked.fg = blue
msglist_*.Subject,~foobar.fg = red
an email with foobar in its subject will be colored in red all the time, since msglist_* also applies to msglist_marked. yeah. it ate. π₯
and when multiple <header>,<header_value> pairs are given, the last style which matches all given patterns will be applied. provided this styleset:
msglist_*.From,~^Bob.Subject,~foobar.fg = red
msglist_*.From,~^Bob.fg = blue
an email from Bob with foobar in its subject will be colored in blue, since the second style is a full match too. order matters, bestie, always has π¦
π COLORS
the color values are set using any of the following methods:
defaultβ the color is set as per the system or terminal default.<Color name>β any w3c approved color name is used to set colors for the style.<Hex code>β hexcode for a color can be used. the format must be#XXXXXX.<Dec number>β color based on the terminal palette index. valid numbers are between0and255.
pick your fighter, they all slay π
π DEFAULTS
before parsing a styleset, it first gets initialized with the following defaults:
*.selected.bg = 12
*.selected.fg = 15
*.selected.bold = true
statusline_*.dim = true
*warning.dim = false
*warning.bold = true
*warning.fg = 11
*success.dim = false
*success.bold = true
*success.fg = 10
*error.dim = false
*error.bold = true
*error.fg = 9
border.bg = 12
border.fg = 15
title.bg = 12
title.fg = 15
title.bold = true
header.fg = 4
header.bold = true
msglist_unread.bold = true
msglist_deleted.dim = true
msglist_marked.bg = 6
msglist_marked.fg = 15
msglist_pill.bg = 12
msglist_pill.fg = 15
part_mimetype.fg = 12
selector_chooser.bold = true
selector_focused.bold = true
selector_focused.bg = 12
selector_focused.fg = 15
completion_*.bg = 8
completion_pill.bg = 12
completion_default.fg = 15
completion_description.fg = 15
completion_description.dim = true
[viewer]
url.underline = true
url.fg = 3
header.bold = true
header.fg = 4
signature.dim = true
signature.fg = 4
diff_meta.bold = true
diff_chunk.fg = 6
diff_chunk_func.fg = 6
diff_chunk_func.dim = true
diff_add.fg = 2
diff_del.fg = 1
diff_whitespace.bg = 1
quote_1.fg = 6
quote_2.fg = 4
quote_3.fg = 6
quote_3.dim = true
quote_4.fg = 4
quote_4.dim = true
quote_x.fg = 5
quote_x.dim = true
code = 5
you can choose either to reset everything (except in the [viewer] section) by starting your styleset with these two lines:
*.default=true
*.normal=true
or selectively override style object attributes. both are valid, do what feels right πΈ
and if you want to also reset the [viewer] section, you need to insert the same two lines:
[viewer]
*.default=true
*.normal=true
okay that's genuinely everything β go forth and make your aerc look absolutely stunning, no notes π
π SEE ALSO
π AUTHORS
Originally created by Drew DeVault and maintained by Robin Jarry who is assisted by other open source contributors. For more information about aerc development, see https://sr.ht/~rjarry/aerc/.
and that's a wrap on AERC-STYLESETS(7), dated 2026-09-07 β you read the whole thing bestie, I'm so proud of you ππ«Ά go style something iconic β¨π
π¦ where this page comes from
- arch rolling: aerc 0.22.0-1 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms