Skip to content

Commit 8598008

Browse files
emersionvilhalmer
authored andcommitted
Split out configuration docs
Create a new mako(5) man page for the configuration file. Configuration options are moved there since most people will use the config file to set them. Supersedes: emersion#182
1 parent a389da5 commit 8598008

File tree

3 files changed

+324
-305
lines changed

3 files changed

+324
-305
lines changed

mako.1.scd

Lines changed: 7 additions & 304 deletions
Original file line numberDiff line numberDiff line change
@@ -11,317 +11,20 @@ mako - notification daemon for Wayland
1111
# DESCRIPTION
1212

1313
mako is a graphical notification daemon for Wayland compositors which support
14-
the layer-shell protocol. Notifications received over dbus are displayed until
14+
the layer-shell protocol. Notifications received over D-Bus are displayed until
1515
dismissed with a click or via *makoctl*(1).
1616

1717
# OPTIONS
1818

1919
*-h, --help*
2020
Show help message and quit.
2121

22-
# GLOBAL CONFIGURATION OPTIONS
22+
*-c, --config*
23+
Custom path to the config file.
2324

24-
*--max-visible* _n_
25-
Set maximum number of visible notifications to _n_. Older notifications will
26-
be hidden. If -1, all notifications are visible.
27-
28-
Default: 5
29-
30-
*--sort* _+/-time_ | _+/-priority_
31-
Sorts incoming notifications by time and/or priority in ascending(+)
32-
or descending(-) order.
33-
34-
Default: -time
35-
36-
*--output* _name_
37-
Show notifications on the specified output. If empty, notifications will
38-
appear on the focused output.
39-
40-
Requires the compositor to support the Wayland protocol
41-
xdg-output-unstable-v1 version 2.
42-
43-
Default: ""
44-
45-
*--layer* _layer_
46-
Arrange mako at the specified layer, relative to normal windows. Supported
47-
values are _background_, _bottom_, _top_, and _overlay_. Using _overlay_
48-
will cause notifications to be displayed above fullscreen windows, though
49-
this may also occur at _top_ depending on your compositor.
50-
51-
Default: top
52-
53-
*--anchor* _position_
54-
Show notifications at the specified position on the output. Supported values
55-
are _top-right_, _top-center_, _top-left_, _bottom-right_, _bottom-center_,
56-
_bottom-left_, and _center_.
57-
58-
Default: top-right
59-
60-
# STYLE OPTIONS
61-
62-
*--font* _font_
63-
Set font to _font_, in Pango format.
64-
65-
Default: monospace 10
66-
67-
*--background-color* _color_
68-
Set background color to _color_. See *COLORS* for more information.
69-
70-
Default: #285577FF
71-
72-
*--text-color* _color_
73-
Set text color to _color_. See *COLORS* for more information.
74-
75-
Default: #FFFFFFFF
76-
77-
*--width* _px_
78-
Set width of notification popups.
79-
80-
Default: 300
81-
82-
*--height* _px_
83-
Set maximum height of notification popups. Notifications whose text takes
84-
up less space are shrunk to fit.
85-
86-
Default: 100
87-
88-
*--margin* _directional_
89-
Set margin of each edge to the size specified by _directional_. See
90-
*DIRECTIONAL VALUES* for more information.
91-
92-
Default: 10
93-
94-
*--padding* _directional_
95-
Set padding on each side to the size specified by _directional_. See
96-
*DIRECTIONAL VALUES* for more information.
97-
98-
Default: 5
99-
100-
*--border-size* _px_
101-
Set popup border size to _px_ pixels.
102-
103-
Default: 1
104-
105-
*--border-color* _color_
106-
Set popup border color to _color_. See *COLORS* for more information.
107-
108-
Default: #4C7899FF
109-
110-
*--border-radius* _px_
111-
Set popup corner radius to _px_ pixels.
112-
113-
Default: 0
114-
115-
*--progress-color* [over|source] _color_
116-
Set popup progress indicator color to _color_. See *COLOR* for more
117-
information. To draw the progress indicator on top of the background
118-
color, use the *over* attribute. To replace the background color, use
119-
the *source* attribute (this can be useful when the notification is
120-
semi-transparent).
121-
122-
Default: over #5588AAFF
123-
124-
*--icons* 0|1
125-
Show icons in notifications.
126-
127-
Default: 1
128-
129-
*--max-icon-size* _px_
130-
Set maximum icon size to _px_ pixels.
131-
132-
Default: 64
133-
134-
*--icon-path* _path_\[:_path_...\]
135-
Paths to search for icons when a notification specifies a name instead
136-
of a full path. Colon-delimited. This approximates the search algorithm
137-
used by the XDG Icon Theme Specification, but does not support any of
138-
the theme metadata. Therefore, if you want to search parent themes,
139-
you'll need to add them to the path manually.
140-
141-
/usr/share/icons/hicolor and /usr/share/pixmaps are always searched.
142-
143-
Default: ""
144-
145-
*--markup* 0|1
146-
If 1, enable Pango markup. If 0, disable Pango markup. If enabled, Pango
147-
markup will be interpreted in your format specifier and in the body of
148-
notifications.
149-
150-
Default: 1
151-
152-
*--actions* 0|1
153-
Applications may request an action to be associated with activating a
154-
notification. Disabling this will cause mako to ignore these requests.
155-
156-
Default: 1
157-
158-
*--format* _format_
159-
Set notification format string to _format_. See *FORMAT SPECIFIERS* for
160-
more information. To change this for grouped notifications, set it within
161-
a _grouped_ criteria.
162-
163-
Default: <b>%s</b>\\n%b
164-
Default when grouped: (%g) <b>%s</b>\\n%b
165-
166-
*--default-timeout* _timeout_
167-
Set the default timeout to _timeout_ in milliseconds. To disable the
168-
timeout, set it to zero.
169-
170-
Default: 0
171-
172-
*--ignore-timeout* 0|1
173-
If set, mako will ignore the expire timeout sent by notifications and use
174-
the one provided by _default-timeout_ instead.
175-
176-
Default: 0
177-
178-
*--group-by* _field[,field,...]_
179-
A comma-separated list of criteria fields that will be compared to other
180-
visible notifications to determine if this one should form a group with
181-
them. All listed criteria must be exactly equal for two notifications to
182-
group.
183-
184-
Default: none
185-
186-
# CRITERIA-ONLY STYLE OPTIONS
187-
188-
Some style options are not useful in the global context and therefore have no
189-
associated command-line option.
190-
191-
*invisible* 0|1
192-
Whether this notification should be invisible even if it is above the
193-
_max-visible_ cutoff. This is used primarily for hiding members of groups.
194-
If you want to make more than the first group member visible, turn this
195-
option off within a _group-index_ criteria.
196-
197-
Default: 0
198-
199-
# CONFIG FILE
200-
201-
The config file is located at *~/.config/mako/config* or at
202-
*$XDG\_CONFIG\_HOME/mako/config*. Each line of the form:
203-
204-
key=value
205-
206-
Is equivalent to passing *--key=value* to mako from the command line. Note that
207-
any quotes used within your shell are unnecessary and also invalid in the
208-
config file.
209-
210-
Empty lines and lines that begin with # are ignored.
211-
212-
# CRITERIA
213-
214-
In addition to the set of options at the top of the file, the config file may
215-
contain zero or more sections, each containing any combination of the
216-
*STYLE OPTIONS*. The sections, called criteria, are defined with an INI-like
217-
square bracket syntax. The brackets may contain any number of fields, like so:
218-
219-
\[field=value field2=value2 ...\]
220-
221-
When a notification is received, it will be compared to the fields defined in
222-
each criteria. If all of the fields match, the style options within will be
223-
applied to the notification. Fields not included in the criteria are not
224-
considered during the match. A notification may match any number of criteria.
225-
This matching occurs in the order the criteria are defined in the config file,
226-
meaning that if multiple criteria match a notification, the last occurrence of
227-
any given style option will "win".
228-
229-
The following fields are available in criteria:
230-
231-
- _app-name_ (string)
232-
- _app-icon_ (string)
233-
- _summary_ (string)
234-
- An exact match on the summary of the notification.
235-
- _urgency_ (one of "low", "normal", "high")
236-
- _category_ (string)
237-
- _desktop-entry_ (string)
238-
- _actionable_ (boolean)
239-
- _expiring_ (boolean)
240-
- _grouped_ (boolean)
241-
- Whether the notification is grouped with any others (its group-index is
242-
not -1).
243-
- _group-index_ (int)
244-
- The notification's index within its group, or -1 if it is not grouped.
245-
- _hidden_ (boolean)
246-
- _hidden_ is special, it defines the style for the placeholder shown when
247-
the number of notifications or groups exceeds _max-visible_.
248-
249-
If a field's value contains special characters, they may be escaped with a
250-
backslash, or quoted:
251-
252-
\[app-name="Google Chrome"\]
253-
254-
\[app-name=Google\\ Chrome\]
255-
256-
Quotes within quotes may also be escaped, and a literal backslash may be
257-
specified as \\\\. No spaces are allowed around the equal sign. Escaping equal
258-
signs within values is unnecessary.
259-
260-
Additionally, boolean values may be specified using any of true/false, 0/1, or
261-
as bare words:
262-
263-
\[actionable=true\] \[actionable=1\] \[actionable\]
264-
265-
\[actionable=false\] \[actionable=0\] \[!actionable\]
266-
267-
There are three criteria always present at the front of the list:
268-
- An empty criteria which matches all notifications and contains the defaults
269-
for all style options, overwritten with any configured in the global section.
270-
- \[grouped\], which sets the default *format* for grouped notifications and
271-
sets them *invisible*.
272-
- \[group-index=0\], which makes the first member of each group visible again.
273-
274-
These options can be overridden by simply defining the criteria yourself and
275-
overriding them.
276-
277-
# COLORS
278-
279-
Colors can be specified as _#RRGGBB_ or _#RRGGBBAA_.
280-
281-
# DIRECTIONAL VALUES
282-
283-
Some options set values that affect all four edges of a notification. These
284-
options can be specified in several different ways, depending on how much
285-
control over each edge is desired:
286-
287-
- A single value will apply to all four edges.
288-
- Two values will set vertical and horizontal edges separately.
289-
- Three will set top, horizontal, and bottom edges separately.
290-
- Four will give each edge a separate value.
291-
292-
When specifying multiple values, they should be comma-separated. For example,
293-
this would set the top margin to 10, left and right to 20, and bottom to five:
294-
295-
```
296-
--margin 10,20,5
297-
```
298-
299-
# FORMAT SPECIFIERS
300-
301-
Format specification works similarly to *printf*(3), but with a different set of
302-
specifiers.
303-
304-
*%%* Literal "%"
305-
306-
*\\\\* Literal "\\"
307-
308-
*\\n* New Line
309-
310-
## For notifications
311-
312-
*%a* Application name
313-
314-
*%s* Notification summary
315-
316-
*%b* Notification body
317-
318-
*%g* Number of notifications in the current group
319-
320-
## For the hidden notifications placeholder
321-
322-
*%h* Number of hidden notifications
323-
324-
*%t* Total number of notifications
25+
Additionally, global configuration options can be specified. Passing
26+
*--key=value* is equivalent to a *key=value* line in the configuration file.
27+
See *mako*(5) for a list of options.
32528

32629
# AUTHORS
32730

@@ -331,4 +34,4 @@ https://github.com/emersion/mako.
33134

33235
# SEE ALSO
33336

334-
*makoctl*(1)
37+
*mako*(5) *makoctl*(1)

0 commit comments

Comments
 (0)