docs/iamb.5
555 lines · 12160 bytes
1.\" iamb(7) manual page
2.\"
3.\" This manual page is written using the mdoc(7) macros. For more
4.\" information, see <https://manpages.bsd.lv/mdoc.html>.
5.\"
6.\" You can preview this file with:
7.\" $ man ./docs/iamb.1
8.Dd Mar 24, 2024
9.Dt IAMB 5
10.Os
11.Sh NAME
12.Nm config.toml
13.Nd configuration file for
14.Sy iamb
15.Sh DESCRIPTION
16Configuration must be placed under
17.Pa ~/.config/iamb/
18and named
19.Nm .
20(If
21.Ev $XDG_CONFIG_HOME
22is set, then
23.Sy iamb
24will look for a directory named
25.Pa iamb
26there instead.)
27.Pp
28Example configuration usually comes bundled with your installation and can
29typically be found in
30.Pa /usr/share/iamb .
31.Pp
32As implied by the filename, the configuration is formatted in TOML.
33It's structure and fields are described below.
34.Sh CONFIGURATION
35These options are sections at the top-level of the file.
36.Bl -tag -width Ds
37.It Sy profiles
38A map of profile names containing per-account information.
39See
40.Sx PROFILES .
41.It Sy default_profile
42The name of the default profile to connect to, unless overwritten by a
43commandline switch.
44It should be one of the names defined in the
45.Sy profiles
46section.
47.It Sy settings
48Overwrite general settings for
49.Sy iamb .
50See
51.Sx SETTINGS
52for a description of possible values.
53.It Sy layout
54Configure the default window layout to use when starting
55.Sy iamb .
56See
57.Sx "STARTUP LAYOUT"
58for more information on how to configure this object.
59.It Sy macros
60Map keybindings to other keybindings.
61See
62.Sx "CUSTOM KEYBINDINGS"
63for how to configure this object.
64.It Sy dirs
65Configure the directories to use for data, logs, and more.
66See
67.Sx DIRECTORIES
68for the possible values you can set in this object.
69.El
70.Sh PROFILES
71These options are configured as fields in the
72.Sy profiles
73object.
74.Bl -tag -width Ds
75.It Sy user_id
76The user ID to use when connecting to the server.
77For example "user" in "@user:matrix.org".
78.It Sy url
79The URL of the user's server.
80(For example "https://matrix.org" for "@user:matrix.org".)
81This is only needed when the server does not have a
82.Pa /.well-known/matrix/client
83entry.
84.El
85.Pp
86In addition to the above fields, you can also reuse the following fields to set
87per-profile overrides of their global values:
88.Bl -bullet -offset indent -width 1m
89.It
90.Sy dirs
91.It
92.Sy layout
93.It
94.Sy macros
95.It
96.Sy settings
97.El
98.Ss Example 1: A single profile
99.Bd -literal -offset indent
100[profiles.personal]
101user_id = "@user:matrix.org"
102.Ed
103.Ss Example 2: Two profiles with a default
104In the following example, there are two profiles,
105.Dq personal
106(set to be the default) and
107.Dq work .
108The
109.Dq work
110profile has an explicit URL set for its homeserver.
111.Bd -literal -offset indent
112default_profile = "personal"
113
114[profiles.personal]
115user_id = "@user:matrix.org"
116
117[profiles.work]
118user_id = "@user:example.com"
119url = "https://matrix.example.com"
120.Ed
121.Sh SETTINGS
122These options are configured as an object under the
123.Sy settings
124key and can be overridden as described in
125.Sx PROFILES .
126.Bl -tag -width Ds
127
128.It Sy default_room
129The room to show by default instead of the
130.Sy :welcome
131window.
132
133.It Sy image_preview
134Enable image previews and configure it.
135An empty object will enable the feature with default settings, omitting it will disable the feature.
136The available fields in this object are:
137.Bl -tag -width Ds
138.It Sy size
139An optional object with
140.Sy width
141and
142.Sy height
143fields to specify the preview size in cells.
144Defaults to 66 and 10.
145.It Sy protocol
146An optional object to override settings that will normally be guessed automatically:
147.Bl -tag -width Ds
148.It Sy type
149An optional string set to one of the protocol types:
150.Dq Sy sixel ,
151.Dq Sy kitty , and
152.Dq Sy halfblocks .
153.It Sy font_size
154An optional list of two numbers representing font width and height in pixels.
155.El
156.El
157.It Sy log_level
158Specifies the lowest log level that should be shown.
159Possible values are:
160.Dq Sy trace ,
161.Dq Sy debug ,
162.Dq Sy info ,
163.Dq Sy warn , and
164.Dq Sy error .
165
166.It Sy message_shortcode_display
167Defines whether or not Emoji characters in messages should be replaced by their
168respective shortcodes.
169
170.It Sy message_user_color
171Defines whether or not the message body is colored like the username.
172
173.It Sy notifications
174When this subsection is present, you can enable and configure push notifications.
175See
176.Sx NOTIFICATIONS
177for more details.
178
179.It Sy open_command
180Defines a custom command and its arguments to run when opening downloads instead of the default.
181(For example,
182.Sy ["my-open",\ "--file"] . )
183
184.It Sy reaction_display
185Defines whether or not reactions should be shown.
186
187.It Sy reaction_shortcode_display
188Defines whether or not reactions should be shown as their respective shortcode.
189
190.It Sy read_receipt_send
191Defines whether or not read confirmations are sent.
192
193.It Sy read_receipt_display
194Defines whether or not read confirmations are displayed.
195
196.It Sy request_timeout
197Defines the maximum time per request in seconds.
198
199.It Sy sort
200Configures how to sort the lists shown in windows like
201.Sy :rooms
202or
203.Sy :members .
204See
205.Sx "SORTING LISTS"
206for more details.
207
208.It Sy typing_notice_send
209Defines whether or not the typing state is sent.
210
211.It Sy typing_notice_display
212Defines whether or not the typing state is displayed.
213
214.It Sy user
215Overrides values for the specified user.
216See
217.Sx "USER OVERRIDES"
218for details on the format.
219
220.It Sy username_display
221Defines how usernames are shown for message senders.
222Possible values are
223.Dq Sy username ,
224.Dq Sy localpart , or
225.Dq Sy displayname .
226
227.It Sy user_gutter_width
228Specify the width of the column where usernames are displayed in a room.
229Usernames that are too long are truncated.
230Defaults to 30.
231.El
232
233.Ss Example 1: Avoid showing Emojis (useful for terminals w/o support)
234.Bd -literal -offset indent
235[settings]
236username = "username"
237message_shortcode_display = true
238reaction_shortcode_display = true
239.Ed
240
241.Ss Example 2: Increase request timeout to 2 minutes for a slow homeserver
242.Bd -literal -offset indent
243[settings]
244request_timeout = 120
245.Ed
246
247.Sh NOTIFICATIONS
248
249The
250.Sy settings.notifications
251subsection allows configuring how notifications for new messages behave.
252
253The available fields in this subsection are:
254.Bl -tag -width Ds
255.It Sy enabled
256Defaults to
257.Sy false .
258Setting this field to
259.Sy true
260enables notifications.
261
262.It Sy via
263Defaults to
264.Dq Sy desktop
265to use the desktop mechanism (default).
266Setting this field to
267.Dq Sy bell
268will use the terminal bell instead.
269
270.It Sy show_message
271controls whether to show the message in the desktop notification, and defaults to
272.Sy true .
273Messages are truncated beyond a small length.
274The notification rules are stored server side, loaded once at startup, and are currently not configurable in iamb.
275In other words, you can simply change the rules with another client.
276.El
277
278.Ss Example 1: Enable notifications with default options
279.Bd -literal -offset indent
280[settings]
281notifications = {}
282.Ed
283.Ss Example 2: Enable notifications using terminal bell
284.Bd -literal -offset indent
285[settings.notifications]
286via = "bell"
287show_message = false
288.Ed
289
290.Sh "SORTING LISTS"
291
292The
293.Sy settings.sort
294subsection allows configuring how different windows have their contents sorted.
295
296Fields available within this subsection are:
297.Bl -tag -width Ds
298.It Sy rooms
299How to sort the
300.Sy :rooms
301window.
302Defaults to
303.Sy ["favorite",\ "lowpriority",\ "unread",\ "name"] .
304.It Sy chats
305How to sort the
306.Sy :chats
307window.
308Defaults to the
309.Sy rooms
310value.
311.It Sy dms
312How to sort the
313.Sy :dms
314window.
315Defaults to the
316.Sy rooms
317value.
318.It Sy spaces
319How to sort the
320.Sy :spaces
321window.
322Defaults to the
323.Sy rooms
324value.
325.It Sy members
326How to sort the
327.Sy :members
328window.
329Defaults to
330.Sy ["power",\ "id"] .
331.El
332.El
333
334.Ss Example 1: Group room members by ther server first
335.Bd -literal -offset indent
336[settings.sort]
337members = ["server", "localpart"]
338.Ed
339
340.Sh "USER OVERRIDES"
341
342The
343.Sy settings.users
344subsections allows overriding how specific senders are displayed.
345Overrides are mapped onto Matrix User IDs such as
346.Sy @user:matrix.org ,
347and are typically written as inline tables containing the following keys:
348
349.Bl -tag -width Ds
350.It Sy name
351Change the display name of the user.
352
353.It Sy color
354Change the color the user is shown as.
355Possible values are:
356.Dq Sy black ,
357.Dq Sy blue ,
358.Dq Sy cyan ,
359.Dq Sy dark-gray ,
360.Dq Sy gray ,
361.Dq Sy green ,
362.Dq Sy light-blue ,
363.Dq Sy light-cyan ,
364.Dq Sy light-green ,
365.Dq Sy light-magenta ,
366.Dq Sy light-red ,
367.Dq Sy light-yellow ,
368.Dq Sy magenta ,
369.Dq Sy none ,
370.Dq Sy red ,
371.Dq Sy white ,
372and
373.Dq Sy yellow .
374.El
375
376.Ss Example 1: Override how @ada:example.com appears in chat
377.Bd -literal -offset indent
378[settings.users]
379"@ada:example.com" = { name = "Ada Lovelace", color = "light-red" }
380.Ed
381
382.Sh STARTUP LAYOUT
383
384The
385.Sy layout
386section allows configuring the initial set of tabs and windows to show when
387starting the client.
388
389.Bl -tag -width Ds
390.It Sy style
391Specifies what window layout to load when starting.
392Valid values are
393.Dq Sy restore
394to restore the layout from the last time the client was exited,
395.Dq Sy new
396to open a single window (uses the value of
397.Sy default_room
398if set), or
399.Dq Sy config
400to open the layout described under
401.Sy tabs .
402
403.It Sy tabs
404If
405.Sy style
406is set to
407.Sy config ,
408then this value will be used to open a set of tabs and windows at startup.
409Each object can contain either a
410.Sy window
411key specifying a username, room identifier or room alias to show, or a
412.Sy split
413key specifying an array of window objects.
414.El
415
416.Ss Example 1: Show a single room every startup
417.Bd -literal -offset indent
418[settings]
419default_room = "#iamb-users:0x.badd.cafe"
420
421[layout]
422style = "new"
423.Ed
424.Ss Example 2: Show a specific layout every startup
425.Bd -literal -offset indent
426[layout]
427style = "config"
428
429[[layout.tabs]]
430window = "iamb://dms"
431
432[[layout.tabs]]
433window = "iamb://rooms"
434
435[[layout.tabs]]
436split = [
437 { "window" = "#iamb-users:0x.badd.cafe" },
438 { "window" = "#iamb-dev:0x.badd.cafe" }
439]
440.Ed
441
442.Sh "CUSTOM KEYBINDINGS"
443
444The
445.Sy macros
446subsections allow configuring custom keybindings.
447Available subsections are:
448
449.Bl -tag -width Ds
450.It Sy insert , Sy i
451Map the key sequences in this section in
452.Sy Insert
453mode.
454
455.It Sy normal , Sy n
456Map the key sequences in this section in
457.Sy Normal
458mode.
459
460.It Sy visual , Sy v
461Map the key sequences in this section in
462.Sy Visual
463mode.
464
465.It Sy select
466Map the key sequences in this section in
467.Sy Select
468mode.
469
470.It Sy command , Sy c
471Map the key sequences in this section in
472.Sy Visual
473mode.
474
475.It Sy operator-pending
476Map the key sequences in this section in
477.Sy "Operator Pending"
478mode.
479.El
480
481Multiple modes can be given together by separating their names with
482.Dq Sy | .
483
484.Ss Example 1: Use "jj" to exit Insert mode
485.Bd -literal -offset indent
486[macros.insert]
487"jj" = "<Esc>"
488.Ed
489
490.Ss Example 2: Use "V" for switching between message bar and room history
491.Bd -literal -offset indent
492[macros."normal|visual"]
493"V" = "<C-W>m"
494.Ed
495
496.Sh DIRECTORIES
497
498Specifies the directories to save data in.
499Configured as an object under the key
500.Sy dirs .
501
502.Bl -tag -width Ds
503.It Sy cache
504Specifies where to store assets and temporary data in.
505(For example,
506.Sy image_preview
507and
508.Sy logs
509will also go in here by default.)
510Defaults to
511.Ev $XDG_CACHE_HOME/iamb .
512
513.It Sy data
514Specifies where to store persistent data in, such as E2EE room keys.
515Defaults to
516.Ev $XDG_DATA_HOME/iamb .
517
518.It Sy downloads
519Specifies where to store downloaded files.
520Defaults to
521.Ev $XDG_DOWNLOAD_DIR .
522
523.It Sy image_previews
524Specifies where to store automatically downloaded image previews.
525Defaults to
526.Ev ${cache}/image_preview_downloads .
527
528.It Sy logs
529Specifies where to store log files.
530Defaults to
531.Ev ${cache}/logs .
532.El
533.Sh FILES
534.Bl -tag -width Ds
535.It Pa ~/.config/iamb/config.toml
536The TOML configuration file that
537.Sy iamb
538loads by default.
539.It Pa ~/.config/iamb/config.json
540A JSON configuration file that
541.Sy iamb
542will load if the TOML one is not found.
543.It Pa /usr/share/iamb/config.example.toml
544A sample configuration file with examples of how to set different values.
545.El
546.Sh "REPORTING BUGS"
547Please report bugs in
548.Sy iamb
549or its manual pages at
550.Lk https://github.com/ulyssa/iamb/issues
551.Sh SEE ALSO
552.Xr iamb 1
553.Pp
554Extended documentation is available online at
555.Lk https://iamb.chat