docs/iamb.5
826 lines · 21276 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.5
8.Dd Sep 19, 2026
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 password_file
79The path to the file containing the password to use when connecting to the server.
80.It Sy url
81The URL of the user's server.
82(For example "https://matrix.org" for "@user:matrix.org".)
83This is only needed when the server does not have a
84.Pa /.well-known/matrix/client
85entry.
86.El
87.Pp
88In addition to the above fields, you can also reuse the following fields to set
89per-profile overrides of their global values:
90.Bl -bullet -offset indent -width 1m
91.It
92.Sy dirs
93.It
94.Sy layout
95.It
96.Sy macros
97.It
98.Sy settings
99.El
100.Ss Example 1: A single profile
101.Bd -literal -offset indent
102[profiles.personal]
103user_id = "@user:matrix.org"
104.Ed
105.Ss Example 2: Two profiles with a default
106In the following example, there are two profiles,
107.Dq personal
108(set to be the default) and
109.Dq work .
110The
111.Dq work
112profile has an explicit URL set for its homeserver.
113.Bd -literal -offset indent
114default_profile = "personal"
115
116[profiles.personal]
117user_id = "@user:matrix.org"
118
119[profiles.work]
120user_id = "@user:example.com"
121url = "https://matrix.example.com"
122.Ed
123.Sh SETTINGS
124These options are configured as an object under the
125.Sy settings
126key and can be overridden as described in
127.Sx PROFILES .
128.Bl -tag -width Ds
129.It Sy cache_policy
130Configure how downloaded files and image previews are cached internally.
131Specifying this object will replace the upstream defaults and possibly lead to unconstrained cache growth.
132Possible keys and their effect are documented at:
133.br
134.Lk https://docs.rs/matrix-sdk/latest/matrix_sdk/media/struct.MediaRetentionPolicy.html#fields
135.It Sy default_markup
136Controls how text in the message bar is interpreted by default.
137Possible values are
138.Dq Sy html ,
139.Dq Sy markdown
140(the default) and
141.Dq Sy plaintext .
142.It Sy default_register
143The default register to read and write to when one isn't specified.
144This defaults to the unnamed register,
145.Sy \(dq ,
146but you can set it to something like
147.Sy +
148if you want to read and write from the system clipboard by default.
149.It Sy default_room
150The room to show by default instead of the
151.Sy :welcome
152window.
153.It Sy default_split
154Controls which direction
155.Sy <C-W>f
156and
157.Sy <C-W><C-F>
158open a new split when following a room identifier under the cursor.
159Possible values are
160.Dq Sy horizontal
161(the default) and
162.Dq Sy vertical .
163.It Sy default_via
164The servers to use to join a room if the homeserver cannot figure out how to join it.
165This defaults to
166.Sy ["matrix.org"] .
167.It Sy encryption
168Configuration subsection for specific settings related to room encryption.
169See
170.Sx ENCRYPTION
171for more details.
172.It Sy external_edit_file_suffix
173Suffix to append to temporary file names when using the :editor command. Defaults to .md.
174.It Sy image_preview
175Subsection for configuring image previews. See
176.Sx "IMAGE PREVIEWS"
177for more details.
178.It Sy ignorecase
179Defines whether searches ignore case. Defaults to false.
180.It Sy input_prompt
181Override the default message bar prompt.
182.It Sy log_level
183Specifies the lowest log level that should be shown.
184Possible values are:
185.Dq Sy trace ,
186.Dq Sy debug ,
187.Dq Sy info ,
188.Dq Sy warn
189(the default), and
190.Dq Sy error .
191Also supports the syntax defined by
192.Lk https://docs.rs/tracing_subscriber/0.3.16/tracing_subscriber/filter/struct.EnvFilter.html
193.It Sy max_log_files
194Specifies how many daily log files should be saved.
195Set this to
196.Sy 0
197to disable automatically deleting log files.
198Defaults to
199.Sy 7 .
200.It Sy mouse
201Enable mouse support
202See
203.Sx MOUSE
204for more details.
205.It Sy message_shortcode_display
206Defines whether or not Emoji characters in messages should be replaced by their
207respective shortcodes.
208.It Sy members_split
209When set, this forces the
210.Sy :members
211command to open in a new window split instead of in the same window.
212Possible values are
213.Dq Sy vertical
214or
215.Dq Sy horizontal ,
216to control what kind of split is done.
217.It Sy message_user_color
218Defines whether or not the message body is colored like the username.
219.It Sy normal_after_send
220Defines whether to reset input to Normal mode after sending a message.
221.It Sy notifications
222When this subsection is present, you can enable and configure push notifications.
223See
224.Sx NOTIFICATIONS
225for more details.
226.It Sy open_command
227Defines a custom command and its arguments to run when handling
228.Sy :open
229instead of the default system behaviour.
230(For example,
231.Sy ["my-open",\ "--file"] . )
232Keep in mind that
233.Sy :open
234can be used for more than just opening downloads:
235this command may also be passed
236.Sy http[s]://
237and
238.Sy geo:
239URLs for relevant messages.
240.It Sy proxy
241When this subsection is present, you can configure how requests are proxied to the homeserver.
242See
243.Sx PROXYING
244for more details.
245.It Sy reaction_display
246Defines whether or not reactions should be shown.
247.It Sy reaction_shortcode_display
248Defines whether or not reactions should be shown as their respective shortcode.
249.It Sy read_receipt_send
250Defines whether or not public read confirmations are sent.
251.It Sy read_receipt_trigger
252Defines under what conditions threads and rooms are marked read.
253Possible values are:
254.Bl -tag -width Ds
255.It Sy focused
256The room or thread must be focused and scrolled to the last message.
257This is the default value.
258.It Sy visible
259The room or thread must be on screen and scrolled to the last message.
260.It Sy scrollback
261Some portion of the scrollback for the room or thread must be on screen, but
262the room does not need to be scrolled to the last message.
263.It Sy message
264A message must be sent to the room before marking it read.
265.El
266.It Sy read_receipt_display
267Defines whether or not read confirmations are displayed.
268.It Sy request_timeout
269Defines the maximum time per request in seconds.
270.It Sy sort
271Configures how to sort the lists shown in windows like
272.Sy :rooms
273or
274.Sy :members .
275See
276.Sx "SORTING LISTS"
277for more details.
278.It Sy state_event_display
279Defines whether the state events like joined or left are shown.
280.It Sy terminal
281Subsection for configuring how specific terminal features are used (or not used).
282See
283.Sx TERMINAL
284for more details.
285.It Sy typing_notice_send
286Defines whether or not the typing state is sent.
287.It Sy typing_notice_display
288Defines whether or not the typing state is displayed.
289.It Sy users
290Overrides values for the specified user.
291See
292.Sx "USER OVERRIDES"
293for details on the format.
294.It Sy username_display
295Defines how usernames are shown for message senders.
296Possible values are
297.Dq Sy username ,
298.Dq Sy localpart ,
299or
300.Dq Sy displayname .
301.It Sy user_gutter_width
302Specify the width of the column where usernames are displayed in a room.
303Usernames that are too long are truncated.
304If this value is less than 3, the usernames are displayed in an extra line at the top of the message
305and this value is only used to indent the message.
306Defaults to 30.
307.It Sy tabstop
308Number of spaces that a <Tab> counts for.
309Defaults to 4.
310.It Sy ssl_verify
311Enable SSL verification for the HTTP requests.
312Defaults to true.
313.El
314.Ss Example 1: Avoid showing Emojis (useful for terminals w/o support)
315.Bd -literal -offset indent
316[settings]
317username = "username"
318message_shortcode_display = true
319reaction_shortcode_display = true
320.Ed
321.Ss Example 2: Increase request timeout to 2 minutes for a slow homeserver
322.Bd -literal -offset indent
323[settings]
324request_timeout = 120
325.Ed
326.Sh ENCRYPTION
327The
328.Sy settings.encryption
329subsection allows controlling how encrypted rooms are presented.
330.Pp
331The available fields in this subsection are:
332.Bl -tag -width Ds
333.It Sy icon_encrypted
334Override the encrypted room icon used in the message bar prompt or title.
335Defaults to a green
336.Sy [E] .
337.It Sy icon_unencrypted
338Override the unencrypted room icon used in the message bar prompt or title.
339Defaults to a red
340.Sy [U] .
341.It Sy icon_unknown
342Override the unknown encryption status icon used in the message bar prompt or title.
343Defaults to a yellow
344.Sy [?] .
345.It Sy indicator
346Defines when an encryption status indicator is shown.
347Possible values are:
348.Dq Sy enabled
349(default, always indicate status),
350.Dq Sy disabled
351(never indicate status),
352.Dq Sy only-unencrypted ,
353and
354.Dq Sy only-encrypted .
355.It Sy indicator_location
356Defines where the encryption status indicator is shown when relevant.
357Possible values are:
358.Dq Sy title ,
359and
360.Dq Sy prompt
361(the default).
362Both can be used via
363.Dq Sy title|prompt .
364.El
365.Sh IMAGE PREVIEWS
366The
367.Sy settings.image_preview
368subsection allows configuring image previews.
369.Pp
370The available fields in this subsection are:
371.Bl -tag -width Ds
372.It Sy enabled
373Defaults to
374.Sy true .
375.It Sy size
376An optional object with
377.Sy width
378and
379.Sy height
380fields to specify the preview size in cells.
381Defaults to 66 and 10.
382.It Sy protocol
383An optional object to override settings that will normally be guessed automatically:
384.Bl -tag -width Ds
385.It Sy type
386An optional string set to one of the protocol types:
387.Dq Sy sixel ,
388.Dq Sy kitty ,
389.Dq Sy iterm2 ,
390and
391.Dq Sy halfblocks .
392.It Sy font_size
393An optional list of two numbers representing font width and height in pixels.
394.It Sy filter
395The sample filter used to scale images.
396Possible values are:
397.Dq Sy Nearest ,
398.Dq Sy Triangle
399(default) ,
400.Dq Sy CatmullRom ,
401.Dq Sy Gaussian ,
402and
403.Dq Sy Lanczos3 .
404See
405.Lk https://docs.rs/image/0.25.10/image/imageops/enum.FilterType.html
406for more information.
407.El
408.El
409.Sh MOUSE
410The
411.Sy settings.mouse
412subsection allows enabling mouse support.
413Currently the only difference is that scrolling moves the window view instead of changing the selection.
414.Pp
415The available fields in this subsection are:
416.Bl -tag -width Ds
417.It Sy enabled
418Defaults to
419.Sy false .
420Setting this field to
421.Sy true
422enables mouse support.
423.El
424.Sh NOTIFICATIONS
425The
426.Sy settings.notifications
427subsection allows configuring how notifications for new messages behave.
428.Pp
429The available fields in this subsection are:
430.Bl -tag -width Ds
431.It Sy enabled
432Defaults to
433.Sy false .
434Setting this field to
435.Sy true
436enables notifications.
437.It Sy via
438Defaults to
439.Dq Sy desktop
440to use the desktop mechanism (default).
441Setting this field to
442.Dq Sy bell
443will use the terminal bell instead.
444Both can be used via
445.Dq Sy desktop|bell .
446.It Sy show_message
447controls whether to show the message in the desktop notification, and defaults to
448.Sy true .
449Messages are truncated beyond a small length.
450The notification rules are stored server side, loaded once at startup, and are currently not configurable in iamb.
451In other words, you can simply change the rules with another client.
452.It Sy sound_hint
453Controls the notification sound name that is passed as a hint to the notification daemon.
454.El
455.Ss Example 1: Enable notifications with default options
456.Bd -literal -offset indent
457[settings.notifications]
458enabled = true
459.Ed
460.Ss Example 2: Enable notifications using terminal bell
461.Bd -literal -offset indent
462[settings.notifications]
463enabled = true
464via = "bell"
465show_message = false
466.Ed
467.Ss Example 3: Enable notifications using the instant message sound
468.Bd -literal -offset indent
469[settings.notifications]
470enabled = true
471sound_hint = "message-new-instant" # Linux
472sound_hint = "IM" # Windows
473.Ed
474.Sh "PROXYING"
475The
476.Sy settings.proxy
477subsection allows configuring proxying for requests to the homeserver.
478.Pp
479Fields available within this subsection are:
480.Bl -tag -width Ds
481.It Sy url
482Either a
483.Sy socks5://IP:PORT
484URL for a SOCKS server to proxy request through,
485or a
486.Sy http[s]://[USER:PASS@]HOST[:PORT]/
487URL to do HTTP(S) proxying through.
488Setting this to the empty string will explicitly disable proxying, and any environment variables will be ignored.
489.It Sy auth
490A value to send in a
491.Sy Proxy-Authorization
492header if your HTTP(S) proxy requires it,
493such as for doing Bearer authentication with a token.
494.It Sy headers
495A subsection for specifying additional headers and values to include in requests sent to the proxy.
496For example, custom HTTPS proxy server software may require specifying a
497.Sy User-Agent
498or a custom header like
499.Sy X-Proxy-Token
500in order to be allowed to send request through it.
501.El
502.Sh "SORTING LISTS"
503The
504.Sy settings.sort
505subsection allows configuring how different windows have their contents sorted.
506.Pp
507Fields available within this subsection are:
508.Bl -tag -width Ds
509.It Sy rooms
510How to sort the
511.Sy :rooms
512window.
513Defaults to
514.Sy ["favorite",\ "lowpriority",\ "unread",\ "name"] .
515.It Sy chats
516How to sort the
517.Sy :chats
518window.
519Defaults to the
520.Sy rooms
521value.
522.It Sy dms
523How to sort the
524.Sy :dms
525window.
526Defaults to the
527.Sy rooms
528value.
529.It Sy spaces
530How to sort the
531.Sy :spaces
532window.
533Defaults to the
534.Sy rooms
535value.
536.It Sy members
537How to sort the
538.Sy :members
539window.
540Defaults to
541.Sy ["power",\ "knock",\ "~invite",\ "id"] .
542.El
543.Pp
544The available values for sorting rooms are:
545.Bl -tag -width Ds
546.It Sy favorite
547Put favorite rooms before other rooms.
548.It Sy lowpriority
549Put lowpriority rooms after other rooms.
550.It Sy name
551Sort rooms by alphabetically ascending room name.
552.It Sy alias
553Sort rooms by alphabetically ascending canonical room alias.
554.It Sy id
555Sort rooms by alphabetically ascending Matrix room identifier.
556.It Sy server
557Sort rooms by alphabetically ascending server name from the room alias.
558This will fall back to the server from the room identifier if there is
559no canonical alias for the room.
560.It Sy unread
561Put unread rooms before other rooms.
562.It Sy recent
563Sort rooms by most recent message timestamp.
564.It Sy invite
565Put invites before other rooms.
566.El
567.Pp
568The available values for sorting users are:
569.Bl -tag -width Ds
570.It Sy power
571Put users with higher power level before other users.
572.It Sy id
573Sort users by alphabetically ascending Matrix user identifier.
574.It Sy localpart
575Sort users by alphabetically ascending local part of the user identifier.
576.It Sy server
577Sort users by alphabetically ascending server name from the user identifier.
578.It Sy invite
579Put invited users before other members.
580.It Sy knock
581Put knocking users before other members.
582.El
583.Pp
584Add a
585.Dq Sy ~
586in front of any value to flip the order.
587.Ss Example 1: Group room members by their server first and descending localpart second
588.Bd -literal -offset indent
589[settings.sort]
590members = ["server", "~localpart"]
591.Ed
592.Sh TERMINAL
593The
594.Sy settings.terminal
595subsection allows overriding how
596.Sy iamb
597interacts with your terminal.
598.Pp
599The available fields in this subsection are:
600.Bl -tag -width Ds
601.It Sy cursor_shape
602Control the terminal cursor shape used by iamb.
603Possible values are:
604.Dq Sy default ,
605.Dq Sy auto ,
606.Dq Sy block ,
607.Dq Sy line , and
608.Dq Sy underline .
609The mode
610.Dq Sy auto
611switches between
612.Dq Sy block
613in normal mode,
614.Dq Sy line
615in insert mode, and
616.Dq Sy underline
617in replace mode.
618Defaults to
619.Dq Sy auto .
620.It Sy enable_extended_keys
621Defines whether to explicitly enable or disable requesting extended keypresses from your terminal.
622By default, when unset,
623.Sy iamb
624will attempt to auto-detect support in your terminal and request extended keypresses from the terminal if supported.
625.It Sy enable_title
626Whether to set the title of the terminal window to
627.Dq Sy iamb (<user_id>) .
628Defaults to true.
629.El
630.Sh "USER OVERRIDES"
631The
632.Sy settings.users
633subsections allows overriding how specific senders are displayed.
634Overrides are mapped onto Matrix User IDs such as
635.Sy @user:matrix.org ,
636and are typically written as inline tables containing the following keys:
637.Bl -tag -width Ds
638.It Sy name
639Change the display name of the user.
640.It Sy color
641Change the color the user is shown as.
642Possible values are:
643.Dq Sy black ,
644.Dq Sy blue ,
645.Dq Sy cyan ,
646.Dq Sy dark-gray ,
647.Dq Sy gray ,
648.Dq Sy green ,
649.Dq Sy light-blue ,
650.Dq Sy light-cyan ,
651.Dq Sy light-green ,
652.Dq Sy light-magenta ,
653.Dq Sy light-red ,
654.Dq Sy light-yellow ,
655.Dq Sy magenta ,
656.Dq Sy none ,
657.Dq Sy red ,
658.Dq Sy white ,
659and
660.Dq Sy yellow .
661.El
662.Ss Example 1: Override how @ada:example.com appears in chat
663.Bd -literal -offset indent
664[settings.users]
665"@ada:example.com" = { name = "Ada Lovelace", color = "light-red" }
666.Ed
667.Sh STARTUP LAYOUT
668The
669.Sy layout
670section allows configuring the initial set of tabs and windows to show when
671starting the client.
672.Bl -tag -width Ds
673.It Sy style
674Specifies what window layout to load when starting.
675Valid values are
676.Dq Sy restore
677to restore the layout from the last time the client was exited,
678.Dq Sy new
679to open a single window (uses the value of
680.Sy default_room
681if set), or
682.Dq Sy config
683to open the layout described under
684.Sy tabs .
685.It Sy tabs
686If
687.Sy style
688is set to
689.Sy config ,
690then this value will be used to open a set of tabs and windows at startup.
691Each object can contain either a
692.Sy window
693key specifying a username, room identifier or room alias to show, or a
694.Sy split
695key specifying an array of window objects.
696.El
697.Ss Example 1: Show a single room every startup
698.Bd -literal -offset indent
699[settings]
700default_room = "#iamb-users:0x.badd.cafe"
701
702[layout]
703style = "new"
704.Ed
705.Ss Example 2: Show a specific layout every startup
706.Bd -literal -offset indent
707[layout]
708style = "config"
709
710[[layout.tabs]]
711window = "iamb://dms"
712
713[[layout.tabs]]
714window = "iamb://rooms"
715
716[[layout.tabs]]
717split = [
718 { "window" = "#iamb-users:0x.badd.cafe" },
719 { "window" = "#iamb-dev:0x.badd.cafe" }
720]
721.Ed
722.Sh "CUSTOM COMMAND ALIASES"
723The
724.Sy aliases
725subsections allow configuring custom aliases.
726.Ss Example 1: Alias commands to single-letter versions
727.Bd -literal -offset indent
728[aliases]
729"c" = "chats"
730"d" = "download"
731"e" = "edit"
732"o" = "open"
733"r" = "rooms"
734.Ed
735.Sh "CUSTOM KEYBINDINGS"
736The
737.Sy macros
738subsections allow configuring custom keybindings.
739Available subsections are:
740.Bl -tag -width Ds
741.It Sy insert , Sy i
742Map the key sequences in this section in
743.Sy Insert
744mode.
745.It Sy normal , Sy n
746Map the key sequences in this section in
747.Sy Normal
748mode.
749.It Sy visual , Sy v
750Map the key sequences in this section in
751.Sy Visual
752mode.
753.It Sy select
754Map the key sequences in this section in
755.Sy Select
756mode.
757.It Sy command , Sy c
758Map the key sequences in this section in
759.Sy Visual
760mode.
761.It Sy operator-pending
762Map the key sequences in this section in
763.Sy "Operator Pending"
764mode.
765.El
766.Pp
767Multiple modes can be given together by separating their names with
768.Dq Sy | .
769.Ss Example 1: Use "jj" to exit Insert mode
770.Bd -literal -offset indent
771[macros.insert]
772"jj" = "<Esc>"
773.Ed
774.Ss Example 2: Use "V" for switching between message bar and room history
775.Bd -literal -offset indent
776[macros."normal|visual"]
777"V" = "<C-W>m"
778.Ed
779.Sh DIRECTORIES
780Specifies the directories to save data in.
781Configured as an object under the key
782.Sy dirs .
783.Bl -tag -width Ds
784.It Sy cache
785Specifies where to store assets and temporary data in.
786(For example,
787.Sy logs
788will also go in here by default.)
789Defaults to
790.Ev $XDG_CACHE_HOME/iamb .
791.It Sy data
792Specifies where to store persistent data in, such as E2EE room keys.
793Defaults to
794.Ev $XDG_DATA_HOME/iamb .
795.It Sy downloads
796Specifies where to store downloaded files.
797Defaults to
798.Ev $XDG_DOWNLOAD_DIR .
799.It Sy logs
800Specifies where to store log files.
801Defaults to
802.Ev ${cache}/logs .
803.El
804.Sh FILES
805.Bl -tag -width Ds
806.It Pa ~/.config/iamb/config.toml
807The TOML configuration file that
808.Sy iamb
809loads by default.
810.It Pa ~/.config/iamb/config.json
811A JSON configuration file that
812.Sy iamb
813will load if the TOML one is not found.
814.It Pa /usr/share/iamb/config.example.toml
815A sample configuration file with examples of how to set different values.
816.El
817.Sh "REPORTING BUGS"
818Please report bugs in
819.Sy iamb
820or its manual pages at
821.Lk https://github.com/ulyssa/iamb/issues
822.Sh SEE ALSO
823.Xr iamb 1
824.Pp
825Extended documentation is available online at
826.Lk https://iamb.chat