1aerc-stylesets(7) Miscellaneous Information Manual aerc-stylesets(7)
2
3
4
6 aerc-stylesets - styleset file specification for aerc(1)
7
9 aerc uses a simple configuration syntax to configure the styleset for
10 its ui.
11
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 ┌───────────────────┬────────────────────────────┐
79 │Style 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 │completion_default │ The default style for the │
135 │ │ completion engine. │
136 ├───────────────────┼────────────────────────────┤
137 │completion_gutter │ The completion gutter. │
138 ├───────────────────┼────────────────────────────┤
139 │completion_pill │ The completion pill. │
140 ├───────────────────┼────────────────────────────┤
141 │tab │ The style for the tab bar. │
142 ├───────────────────┼────────────────────────────┤
143 │stack │ The style for ui stack el‐ │
144 │ │ ement. │
145 ├───────────────────┼────────────────────────────┤
146 │spinner │ The style for the loading │
147 │ │ spinner. │
148 ├───────────────────┼────────────────────────────┤
149 │border │ The style used to draw │
150 │ │ borders. Only the back‐ │
151 │ │ ground color is used. │
152 ├───────────────────┼────────────────────────────┤
153 │selector_default │ The default style for the │
154 │ │ selector ui element. │
155 ├───────────────────┼────────────────────────────┤
156 │selector_focused │ The focused item in a se‐ │
157 │ │ lector ui element. │
158 ├───────────────────┼────────────────────────────┤
159 │selector_chooser │ The item chooser in a se‐ │
160 │ │ lector ui element. │
161 └───────────────────┴────────────────────────────┘
162
163 fnmatch style wildcard matching
164 The styleset configuration can be made simpler by using the fnmatch
165 style wildcard matching for the style object.
166
167 The special characters used in the fnmatch wildcards are:
168
169 ┌────────┬────────────────────────────┐
170 │Pattern │ Meaning │
171 ├────────┼────────────────────────────┤
172 │* │ Matches everything │
173 ├────────┼────────────────────────────┤
174 │? │ Matches any single charac‐ │
175 │ │ ter │
176 └────────┴────────────────────────────┘
177 For example, the following wildcards can be made using this syntax.
178
179 ┌─────────────────┬───────────────────────────┐
180 │Example │ Description │
181 ├─────────────────┼───────────────────────────┤
182 │*.fg=blue │ Set the foreground color │
183 │ │ of all style objects to │
184 │ │ blue. │
185 ├─────────────────┼───────────────────────────┤
186 │*list.bg=hotpink │ Set the background color │
187 │ │ of all style objects that │
188 │ │ end in list to hotpink. │
189 └─────────────────┴───────────────────────────┘
190
191 Selected modifier
192 Selected modifier can be applied to any style object. The style pro‐
193 vided for the selected modifier are applied on top of the style object
194 it corresponds to.
195
196 If you would like to make sure message that are flagged as read in the
197 msglist appear in yellow foreground and black background. You can spec‐
198 ify that with this:
199
200 msglist_default.selected.fg=yellow
201
202 msglist_default.selected.bg=black
203
204 If we specify the global style selected modifer using fnmatch as below:
205
206 *.selected.reverse=toggle
207
208 This toggles the reverse switch for selected version of all the style
209 objects.
210
211 Layered styles
212 Some styles, (currently only the `msglist*` ones) are applied in lay‐
213 ers. If a style differs from the base (in this case `msglist_default`)
214 then that style applies, unless overridden by a higher layer. The order
215 that `msglist` styles are applied in is, from first to last:
216
217 msglist_default
218 msglist_unread
219 msglist_read
220 msglist_flagged
221 msglist_deleted
222 msglist_marked
223
224 So, the marked style will override all other msglist styles.
225
226 Colors
227 The color values are set using the values accepted by the tcell li‐
228 brary. The values can be one of the following.
229
230 default
231 The color is set as per the system or terminal default.
232
233 <Color name>
234 Any w3c approved color name is used to set colors for the
235 style.
236
237 <Hex code>
238 Hexcode for a color can be used. The format must be "#XXXXXX"
239
240 2021-07-21 aerc-stylesets(7)