1aerc-stylesets(7)      Miscellaneous Information Manual      aerc-stylesets(7)
2
3
4

Name

6       aerc-stylesets - styleset file specification for aerc(1)
7

SYNOPSIS

9       aerc uses a simple configuration syntax to configure the styleset for
10       its ui.
11

Styleset Configuration

13       Aerc uses a simple configuration file to describe a styleset. The
14       styleset is described as key, value pairs. In each line, the key repre‐
15       sents the style object it signifies and the color/atrribute of that is
16       modified.
17
18       For example, in the line below, the foreground color of the style ob‐
19       ject "msglist_unread" is set to "cornflowerblue"
20           msglist_unread.fg=cornflowerblue
21
22       The configuration also allows wildcard matching of the style_objects to
23       configure multiple style objects at a time.
24
25   Style
26       The following options are available to be modified for each of the
27       style objects.
28
29       fg
30           The foreground color of the style object is set.
31
32           Syntax: `<style_object>.fg=<color>`
33
34       bg
35           The background color of the style object is set.
36
37           Syntax: `<style_object>.bg=<color>`
38
39       bold
40           The bold attribute of the style object is set/unset.
41
42           Syntax: `<style_object>.bold=<true|false|toggle>`
43
44       blink
45           The blink attribute of the style object is set/unset. The terminal
46           needs to support blinking text
47
48           Syntax: `<style_object>.bold=<true|false|toggle>`
49
50       underline
51           The underline attribute of the style object is set/unset. The ter‐
52           minal needs to support underline text
53
54           Syntax: `<style_object>.underline=<true|false|toggle>`
55
56       reverse
57           Reverses the color of the style object. Exchanges the foreground
58           and background colors.
59
60           Syntax: `<style_object>.reverse=<true|false|toggle>` If the value
61           is false, it doesn't change anything
62
63       normal
64           All the attributes of the style object are unset.
65
66           Syntax: `<style_object>.normal=<true>` The value doesn't matter
67
68       default
69           Set the style object to the default style of the context. Usually
70           based on the terminal.
71
72           Syntax: `<style_object>.default=<true>` The value doesn't matter
73
74   Style Objects
75       The style objects represent the various ui elements or ui instances for
76       styling.
77
78       ┌───────────────────┬────────────────────────────┐
79Style Object       Description                
80       ├───────────────────┼────────────────────────────┤
81       │default            │ The default style object   │
82       │                   │ used for normal ui ele‐    │
83       │                   │ ments while not using spe‐ │
84       │                   │ cialized configuration.    │
85       ├───────────────────┼────────────────────────────┤
86       │error              │ The style used to show er‐ │
87       │                   │ rors.                      │
88       ├───────────────────┼────────────────────────────┤
89       │warning            │ The style used when show‐  │
90       │                   │ ing warnings.              │
91       ├───────────────────┼────────────────────────────┤
92       │success            │ The style used for success │
93       │                   │ messages.                  │
94       ├───────────────────┼────────────────────────────┤
95       │title              │ The style object used to   │
96       │                   │ style titles in ui ele‐    │
97       │                   │ ments.                     │
98       ├───────────────────┼────────────────────────────┤
99       │header             │ The style object used to   │
100       │                   │ style headers in ui ele‐   │
101       │                   │ ments.                     │
102       ├───────────────────┼────────────────────────────┤
103       │statusline_default │ The default style applied  │
104       │                   │ to the statusline.         │
105       ├───────────────────┼────────────────────────────┤
106       │statusline_error   │ The style used for error   │
107       │                   │ messages in statusline.    │
108       ├───────────────────┼────────────────────────────┤
109       │statusline_success │ The style used for success │
110       │                   │ messages in statusline.    │
111       ├───────────────────┼────────────────────────────┤
112       │msglist_default    │ The default style for mes‐ │
113       │                   │ sages in a message list.   │
114       ├───────────────────┼────────────────────────────┤
115       │msglist_unread     │ Unread messages in a mes‐  │
116       │                   │ sage list.                 │
117       ├───────────────────┼────────────────────────────┤
118       │msglist_read       │ Read messages in a message │
119       │                   │ list.                      │
120       ├───────────────────┼────────────────────────────┤
121       │msglist_flagged    │ The messages with the      │
122       │                   │ flagged flag.              │
123       ├───────────────────┼────────────────────────────┤
124       │msglist_deleted    │ The messages marked as     │
125       │                   │ deleted.                   │
126       ├───────────────────┼────────────────────────────┤
127       │msglist_marked     │ The messages with the      │
128       │                   │ marked flag.               │
129       ├───────────────────┼────────────────────────────┤
130       │dirlist_default    │ The default style for di‐  │
131       │                   │ rectories in the directory │
132       │                   │ list.                      │
133       ├───────────────────┼────────────────────────────┤
134       │dirlist_unread     │ The style used for direc‐  │
135       │                   │ tories with unread mes‐    │
136       │                   │ sages                      │
137       ├───────────────────┼────────────────────────────┤
138       │dirlist_recent     │ The style used for direc‐  │
139       │                   │ tories with recent mes‐    │
140       │                   │ sages                      │
141       ├───────────────────┼────────────────────────────┤
142       │completion_default │ The default style for the  │
143       │                   │ completion engine.         │
144       ├───────────────────┼────────────────────────────┤
145       │completion_gutter  │ The completion gutter.     │
146       ├───────────────────┼────────────────────────────┤
147       │completion_pill    │ The completion pill.       │
148       ├───────────────────┼────────────────────────────┤
149       │tab                │ The style for the tab bar. │
150       ├───────────────────┼────────────────────────────┤
151       │stack              │ The style for ui stack el‐ │
152       │                   │ ement.                     │
153       ├───────────────────┼────────────────────────────┤
154       │spinner            │ The style for the loading  │
155       │                   │ spinner.                   │
156       ├───────────────────┼────────────────────────────┤
157       │border             │ The style used to draw     │
158       │                   │ borders. Only the back‐    
159       │                   │ ground color is used un‐   
160       │                   │ less you customize border- 
161       │                   │ char-vertical and/or bor‐  
162       │                   │ der-char-horizontal in     
163       │                   │ aerc.conf.                 │
164       ├───────────────────┼────────────────────────────┤
165       │selector_default   │ The default style for the  │
166       │                   │ selector ui element.       │
167       ├───────────────────┼────────────────────────────┤
168       │selector_focused   │ The focused item in a se‐  │
169       │                   │ lector ui element.         │
170       ├───────────────────┼────────────────────────────┤
171       │selector_chooser   │ The item chooser in a se‐  │
172       │                   │ lector ui element.         │
173       └───────────────────┴────────────────────────────┘
174
175   fnmatch style wildcard matching
176       The styleset configuration can be made simpler by using the fnmatch
177       style wildcard matching for the style object.
178
179       The special characters used in the fnmatch wildcards are:
180
181       ┌────────┬────────────────────────────┐
182Pattern Meaning                    
183       ├────────┼────────────────────────────┤
184       │*       │ Matches everything         │
185       ├────────┼────────────────────────────┤
186       │?       │ Matches any single charac‐ │
187       │        │ ter                        │
188       └────────┴────────────────────────────┘
189       For example, the following wildcards can be made using this syntax.
190
191       ┌─────────────────┬───────────────────────────┐
192Example          │ Description               │
193       ├─────────────────┼───────────────────────────┤
194       │*.fg=blue        │ Set the foreground color  │
195       │                 │ of all style objects to   │
196       │                 │ blue.                     │
197       ├─────────────────┼───────────────────────────┤
198       │*list.bg=hotpink │ Set the background color  │
199       │                 │ of all style objects that │
200       │                 │ end in list  to hotpink.  │
201       └─────────────────┴───────────────────────────┘
202
203   Selected modifier
204       Selected modifier can be applied to any style object. The style pro‐
205       vided for the selected modifier are applied on top of the style object
206       it corresponds to.
207
208       If you would like to make sure message that are flagged as read in the
209       msglist appear in yellow foreground and black background. You can spec‐
210       ify that with this:
211
212           msglist_default.selected.fg=yellow
213
214           msglist_default.selected.bg=black
215
216       If we specify the global style selected modifer using fnmatch as below:
217
218           *.selected.reverse=toggle
219
220       This toggles the reverse switch for selected version of all the style
221       objects.
222
223   Layered styles
224       Some styles, (currently the `msglist*` and `dirlist*` ones) are applied
225       in layers. If a style differs from the base (in this case `{ms‐
226       glist|dirlist}_default`) then that style applies, unless overridden by
227       a higher layer. The order that `msglist` styles are applied in is, from
228       first to last:
229
230           msglist_default
231           msglist_unread
232           msglist_read
233           msglist_flagged
234           msglist_deleted
235           msglist_marked
236
237       So, the marked style will override all other msglist styles. The order
238       for `dirlist` styles is:
239
240           dirlist_default
241           dirlist_unread
242           dirlist_recent
243
244   Colors
245       The color values are set using the values accepted by the tcell li‐
246       brary. The values can be one of the following.
247
248           default
249               The color is set as per the system or terminal default.
250
251           <Color name>
252               Any w3c approved color name is used to set colors for the
253               style.
254
255           <Hex code>
256               Hexcode for a color can be used. The format must be "#XXXXXX"
257
258           <Dec number>
259               Color based on the palette index. Valid numbers are between 0
260               and 255.
261

SEE ALSO

263       aerc(1) aerc-config(5)
264

AUTHORS

266       Originally created by Drew DeVault <sir@cmpwn.com> and maintained by
267       Robin Jarry <robin@jarry.cc> who is assisted by other open source con‐
268       tributors. For more information about aerc development, see
269       https://sr.ht/~rjarry/aerc/.
270
271
272
273                                  2022-06-18                 aerc-stylesets(7)
Impressum