1mako(5)                       File Formats Manual                      mako(5)
2
3
4

NAME

6       mako - configuration file
7

DESCRIPTION

9       The config file is located at ~/.config/mako/config or at $XDG_CON‐
10       FIG_HOME/mako/config. Option lines can be specified to configure mako
11       like so:
12
13           key=value
14
15       Empty lines and lines that begin with # are ignored.
16

GLOBAL CONFIGURATION OPTIONS

18       max-history=n
19           Set maximum number of expired notifications to keep in the history
20           buffer to n. If the buffer is full, newly expired notifications re‐
21           place the oldest ones. If 0, history is disabled.
22
23           Default: 5
24
25       sort=+/-time | +/-priority
26           Sorts incoming notifications by time and/or priority in ascend‐
27           ing(+) or descending(-) order.
28
29           Default: -time
30

BUTTON AND TOUCH BINDINGS

32       Specify the action to take per button or touch event. Supported values
33       are none, dismiss, dismiss-all, dismiss-group, invoke-default-action,
34
35       on-button-left=action
36           Default: invoke-default-action
37
38       on-button-middle=action
39           Default: none
40
41       on-button-right=action
42           Default: dismiss
43
44       on-touch=action
45           Default: dismiss
46

STYLE OPTIONS

48       font=font
49           Set font to font, in Pango format.
50
51           Default: monospace 10
52
53       background-color=color
54           Set background color to color. See COLORS for more information.
55
56           Default: #285577FF
57
58       text-color=color
59           Set text color to color. See COLORS for more information.
60
61           Default: #FFFFFFFF
62
63       width=px
64           Set width of notification popups.
65
66           Default: 300
67
68       height=px
69           Set maximum height of notification popups. Notifications whose text
70           takes up less space are shrunk to fit.
71
72           Default: 100
73
74       margin=directional
75           Set margin of each edge to the size specified by directional. See
76           DIRECTIONAL VALUES for more information.
77
78           Default: 10
79
80       padding=directional
81           Set padding on each side to the size specified by directional. See
82           DIRECTIONAL VALUES for more information.
83
84           Default: 5
85
86       border-size=px
87           Set popup border size to px pixels.
88
89           Default: 2
90
91       border-color=color
92           Set popup border color to color. See COLORS for more information.
93
94           Default: #4C7899FF
95
96       border-radius=px
97           Set popup corner radius to px pixels.
98
99           Default: 0
100
101       progress-color=[over|source] color
102           Set popup progress indicator color to color. See COLOR for more in‐
103           formation. To draw the progress indicator on top of the background
104           color, use the over attribute. To replace the background color, use
105           the source attribute (this can be useful when the notification is
106           semi-transparent).
107
108           Progress can be indicated in a notification by setting a hint,
109           "value" to an integer between 0 and 100 inclusive.
110
111           Default: over #5588AAFF
112
113       icons=0|1
114           Show icons in notifications.
115
116           Default: 1
117
118       max-icon-size=px
119           Set maximum icon size to px pixels.
120
121           Default: 64
122
123       icon-path=path[:path...]
124           Paths to search for icons when a notification specifies a name in‐
125           stead of a full path. Colon-delimited. This approximates the search
126           algorithm used by the XDG Icon Theme Specification, but does not
127           support any of the theme metadata. Therefore, if you want to search
128           parent themes, you'll need to add them to the path manually.
129
130           The path should be the root of the icon theme, the categories and
131           resolutions will be searched for the most appropriate match.
132
133           /usr/share/icons/hicolor and /usr/share/pixmaps are always
134           searched.
135
136           Default: ""
137
138       icon-location=position
139           Position of the icon relative to the displayed text. Valid options
140           are left, right, top and bottom.
141
142           Default: left
143
144       markup=0|1
145           If 1, enable Pango markup. If 0, disable Pango markup. If enabled,
146           Pango markup will be interpreted in your format specifier and in
147           the body of notifications.
148
149           Default: 1
150
151       actions=0|1
152           Applications may request an action to be associated with activating
153           a notification. Disabling this will cause mako to ignore these re‐
154           quests.
155
156           Default: 1
157
158       history=0|1
159           If set, mako will save notifications that have reached their time‐
160           out into the history buffer instead of immediately deleting them.
161           max-history determines the size of the history buffer.
162
163           Default: 1
164
165       format=format
166           Set notification format string to format. See FORMAT SPECIFIERS for
167           more information. To change this for grouped notifications, set it
168           within a grouped criteria.
169
170           Default: <b>%s</b>\n%b
171           Default when grouped: (%g) <b>%s</b>\n%b
172
173       text-alignment=left|center|right
174           Set notification text alignment.
175
176           Default: left
177
178       default-timeout=timeout
179           Set the default timeout to timeout in milliseconds. To disable the
180           timeout, set it to zero.
181
182           Default: 0
183
184       ignore-timeout=0|1
185           If set, mako will ignore the expire timeout sent by notifications
186           and use the one provided by default-timeout instead.
187
188           Default: 0
189
190       group-by=field[,field,...]
191           A comma-separated list of criteria fields that will be compared to
192           other visible notifications to determine if this one should form a
193           group with them. All listed criteria must be exactly equal for two
194           notifications to group.
195
196           Default: none
197
198       max-visible=n
199           Set maximum number of visible notifications to n. Older notifica‐
200           tions will be hidden. If -1, all notifications are visible.
201
202           Default: 5
203
204       output=name
205           Show notifications on the specified output. If empty, notifications
206           will appear on the focused output.
207
208           Requires the compositor to support the Wayland protocol xdg-output-
209           unstable-v1 version 2.
210
211           Default: ""
212
213       layer=layer
214           Arrange mako at the specified layer, relative to normal windows.
215           Supported values are background, bottom, top, and overlay. Using
216           overlay will cause notifications to be displayed above fullscreen
217           windows, though this may also occur at top depending on your com‐
218           positor.
219
220           Default: top
221
222       anchor=position
223           Show notifications at the specified position on the output. Sup‐
224           ported values are top-right, top-center, top-left, bottom-right,
225           bottom-center, bottom-left, and center.
226
227           Default: top-right
228

CRITERIA

230       In addition to the set of options at the top of the file, the config
231       file may contain zero or more sections, each containing any combination
232       of the STYLE OPTIONS. The sections, called criteria, are defined with
233       an INI-like square bracket syntax. The brackets may contain any number
234       of fields, like so:
235
236           [field=value field2=value2 ...]
237
238       When a notification is received, it will be compared to the fields de‐
239       fined in each criteria. If all of the fields match, the style options
240       within will be applied to the notification. Fields not included in the
241       criteria are not considered during the match. A notification may match
242       any number of criteria. This matching occurs in the order the criteria
243       are defined in the config file, meaning that if multiple criteria match
244       a notification, the last occurrence of any given style option will
245       "win".
246
247       The following fields are available in criteria:
248
249app-name (string)
250app-icon (string)
251summary (string)
252           •   An exact match on the summary of the notification.
253           •   This field conflicts with summary~.
254summary~ (string)
255           •   A POSIX extended regular expression match on the summary of the
256               notification.
257           •   This field conflicts with summary.
258body (string)
259           •   An exact match on the body of the notification.
260           •   This field conflicts with body~.
261body~ (string)
262           •   A POSIX extended regular expression match on the body of the
263
264       notification.
265           •   This field conflicts with body.
266urgency (one of "low", "normal", "critical")
267category (string)
268desktop-entry (string)
269actionable (boolean)
270expiring (boolean)
271
272
273       The following fields are also available to match on a second pass based
274       on where previous style options decided to place each notification:
275
276grouped (boolean)
277           •   Whether the notification is grouped with any others (its group-
278               index is not -1).
279group-index (int)
280           •   The notification's index within its group, or -1 if it is not
281               grouped.
282hidden (boolean)
283hidden is special, it defines the style for the placeholder
284               shown when the number of notifications or groups exceeds max-
285               visible.
286output (string)
287             - Which output the notification was sorted onto. See the output
288           style
289               option for possible values.
290anchor (string)
291           •   Which position on the output the notification was assigned to.
292               See the
293               anchor style option for possible values.
294
295
296       There are only two passes performed on each notification, so the sec‐
297       ond-pass critera are not allowed to reposition the notification.
298
299       If a field's value contains special characters, they may be escaped
300       with a backslash, or quoted:
301
302           [app-name="Google Chrome"]
303
304           [app-name=Google\ Chrome]
305
306       Quotes within quotes may also be escaped, and a literal backslash may
307       be specified as \\. No spaces are allowed around the equal sign. Escap‐
308       ing equal signs within values is unnecessary.
309
310       Additionally, boolean values may be specified using any of true/false,
311       0/1, or as bare words:
312
313           [actionable=true] [actionable=1] [actionable]
314
315           [actionable=false] [actionable=0] [!actionable]
316
317       There are three criteria always present at the front of the list:
318       •   An empty criteria which matches all notifications and contains the
319           defaults for all style options, overwritten with any configured in
320           the global section.
321       •   [grouped], which sets the default format for grouped notifications
322           and sets them invisible.
323       •   [group-index=0], which makes the first member of each group visible
324           again.
325
326
327       These options can be overridden by simply defining the criteria your‐
328       self and overriding them.
329
330       There are some rules restricting what can be configured depending on
331       what is being matched by a given criteria:
332
333       •   Criteria matching grouped or group-index are not allowed to change
334           the anchor, output, or group-by, as this would invalidate the
335           grouping. Grouping is only performed once rather than recursively,
336           to avoid the potential for infinite loops.
337
338

CRITERIA-ONLY STYLE OPTIONS

340       Some style options are not useful in the global context and therefore
341       have no associated command-line option.
342
343       invisible=0|1
344           Whether this notification should be invisible even if it is above
345           the max-visible cutoff. This is used primarily for hiding members
346           of groups. If you want to make more than the first group member
347           visible, turn this option off within a group-index criteria.
348
349           Default: 0
350

COLORS

352       Colors can be specified as #RRGGBB or #RRGGBBAA.
353

DIRECTIONAL VALUES

355       Some options set values that affect all four edges of a notification.
356       These options can be specified in several different ways, depending on
357       how much control over each edge is desired:
358
359       •   A single value will apply to all four edges.
360       •   Two values will set vertical and horizontal edges separately.
361       •   Three will set top, horizontal, and bottom edges separately.
362       •   Four will give each edge a separate value.
363
364
365       When specifying multiple values, they should be comma-separated. For
366       example, this would set the top margin to 10, left and right to 20, and
367       bottom to five:
368
369           margin = 10,20,5
370

FORMAT SPECIFIERS

372       Format specification works similarly to printf(3), but with a different
373       set of specifiers.
374
375       %%   Literal "%"
376
377       \\   Literal "\"
378
379       \n   New Line
380
381   For notifications
382       %a   Application name
383
384       %s   Notification summary
385
386       %b   Notification body
387
388       %g   Number of notifications in the current group
389
390   For the hidden notifications placeholder
391       %h   Number of hidden notifications
392
393       %t   Total number of notifications
394

AUTHORS

396       Maintained by Simon Ser <contact@emersion.fr>, who is assisted by other
397       open-source contributors. For more information about mako development,
398       see https://github.com/emersion/mako.
399

SEE ALSO

401       mako(1) makoctl(1)
402
403
404
405                                  2021-05-04                           mako(5)
Impressum