IAMB(5)

πŸ“¦
version 0.0.11 Β· 3 versions
, in alpine 3.24, nixos 26.05

πŸ’– IAMB(5) β€” File Formats Manual πŸ’–

okay bestie, gather round 🫢 this is the manual page for config.toml, the config file for iamb. It's giving β€œtiny file, huge personality” and we're gonna go through every single bit together. No cap, by the end you'll know this file like the back of your hand. πŸ’…


🌸 NAME 🌸

config.toml β€” configuration file for iamb

πŸ¦‹ DESCRIPTION πŸ¦‹

Configuration must be placed under ~/.config/iamb/ and named config.toml. (If $XDG_CONFIG_HOME is set, then iamb will look for a directory named iamb there instead.)

Example configuration usually comes bundled with your installation and can typically be found in /usr/share/iamb.

As implied by the filename, the configuration is formatted in TOML. Its structure and fields are described below.

✨ CONFIGURATION ✨

These options are sections at the top-level of the file.

  • profiles β€” A map of profile names containing per-account information. See β€œPROFILES”.
  • default_profile β€” The name of the default profile to connect to, unless overwritten by a commandline switch. It should be one of the names defined in the profiles section.
  • settings β€” Overwrite general settings for iamb. See β€œSETTINGS” for a description of possible values.
  • layout β€” Configure the default window layout to use when starting iamb. See β€œSTARTUP LAYOUT” for more information on how to configure this object.
  • macros β€” Map keybindings to other keybindings. See β€œCUSTOM KEYBINDINGS” for how to configure this object.
  • dirs β€” Configure the directories to use for data, logs, and more. See β€œDIRECTORIES” for the possible values you can set in this object.

πŸŽ€ PROFILES πŸŽ€

These options are configured as fields in the profiles object.

  • user_id β€” The user ID to use when connecting to the server. For example "user" in "@user:matrix.org".
  • url β€” The URL of the user's server. (For example "https://matrix.org" for "@user:matrix.org".) This is only needed when the server does not have a /.well-known/matrix/client entry.

In addition to the above fields, you can also reuse the following fields to set per-profile overrides of their global values:

  • dirs
  • layout
  • macros
  • settings

✨ Example 1: A single profile ✨

[profiles.personal]
user_id = "@user:matrix.org"

πŸ’– Example 2: Two profiles with a default πŸ’–

In the following example, there are two profiles, β€œpersonal” (set to be the default) and β€œwork”. The β€œwork” profile has an explicit URL set for its homeserver.

default_profile = "personal"

[profiles.personal]
user_id = "@user:matrix.org"

[profiles.work]
user_id = "@user:example.com"
url = "https://matrix.example.com"

πŸ‘‘ SETTINGS πŸ‘‘

These options are configured as an object under the settings key and can be overridden as described in β€œPROFILES”. Lowkey this is where most of the personalization lives.

  • external_edit_file_suffix β€” Suffix to append to temporary file names when using the :editor command. Defaults to .md.
  • default_room β€” The room to show by default instead of the :welcome window.
  • image_preview β€” Enable image previews and configure it. An empty object will enable the feature with default settings; omitting it will disable the feature. The available fields in this object are:
    • size β€” An optional object with width and height fields to specify the preview size in cells. Defaults to 66 and 10.
    • protocol β€” An optional object to override settings that will normally be guessed automatically:
      • type β€” An optional string set to one of the protocol types: "sixel", "kitty", and "halfblocks".
      • font_size β€” An optional list of two numbers representing font width and height in pixels.
  • log_level β€” Specifies the lowest log level that should be shown. Possible values are: "trace", "debug", "info", "warn", and "error".
  • message_shortcode_display β€” Defines whether or not Emoji characters in messages should be replaced by their respective shortcodes.
  • message_user_color β€” Defines whether or not the message body is colored like the username.
  • normal_after_send β€” Defines whether to reset input to Normal mode after sending a message.
  • notifications β€” When this subsection is present, you can enable and configure push notifications. See β€œNOTIFICATIONS” for more details.
  • open_command β€” Defines a custom command and its arguments to run when opening downloads instead of the default. (For example, ["my-open", "--file"].)
  • reaction_display β€” Defines whether or not reactions should be shown.
  • reaction_shortcode_display β€” Defines whether or not reactions should be shown as their respective shortcode.
  • read_receipt_send β€” Defines whether or not read confirmations are sent.
  • read_receipt_display β€” Defines whether or not read confirmations are displayed.
  • request_timeout β€” Defines the maximum time per request in seconds.
  • sort β€” Configures how to sort the lists shown in windows like :rooms or :members. See β€œSORTING LISTS” for more details.
  • state_event_display β€” Defines whether the state events like joined or left are shown.
  • typing_notice_send β€” Defines whether or not the typing state is sent.
  • typing_notice_display β€” Defines whether or not the typing state is displayed.
  • user β€” Overrides values for the specified user. See β€œUSER OVERRIDES” for details on the format.
  • username_display β€” Defines how usernames are shown for message senders. Possible values are "username", "localpart", or "displayname".
  • user_gutter_width β€” Specify the width of the column where usernames are displayed in a room. Usernames that are too long are truncated. Defaults to 30.
  • tabstop β€” Number of spaces that a <Tab> counts for. Defaults to 4.

πŸ“ Example 1: Avoid showing Emojis (useful for terminals w/o support) πŸ“

[settings]
username = "username"
message_shortcode_display = true
reaction_shortcode_display = true

⭐ Example 2: Increase request timeout to 2 minutes for a slow homeserver ⭐

[settings]
request_timeout = 120

πŸ¦‹ NOTIFICATIONS πŸ¦‹

The settings.notifications subsection allows configuring how notifications for new messages behave. It's giving push notification central, iykyk.

The available fields in this subsection are:

  • enabled β€” Defaults to false. Setting this field to true enables notifications.
  • via β€” Defaults to "desktop" to use the desktop mechanism (default). Setting this field to "bell" will use the terminal bell instead. Both can be used via "desktop|bell".
  • show_message β€” controls whether to show the message in the desktop notification, and defaults to true. Messages are truncated beyond a small length. The notification rules are stored server side, loaded once at startup, and are currently not configurable in iamb. In other words, you can simply change the rules with another client.

πŸ’œ Example 1: Enable notifications with default options πŸ’œ

[settings]
notifications = {}

🌈 Example 2: Enable notifications using terminal bell 🌈

[settings.notifications]
via = "bell"
show_message = false

πŸ’« SORTING LISTS πŸ’«

The settings.sort subsection allows configuring how different windows have their contents sorted. Vibe check: sorted.

Fields available within this subsection are:

  • rooms β€” How to sort the :rooms window. Defaults to ["favorite", "lowpriority", "unread", "name"].
  • chats β€” How to sort the :chats window. Defaults to the rooms value.
  • dms β€” How to sort the :dms window. Defaults to the rooms value.
  • spaces β€” How to sort the :spaces window. Defaults to the rooms value.
  • members β€” How to sort the :members window. Defaults to ["power", "id"].

The available values are:

  • favorite β€” Put favorite rooms before other rooms.
  • lowpriority β€” Put lowpriority rooms after other rooms.
  • name β€” Sort rooms by alphabetically ascending room name.
  • alias β€” Sort rooms by alphabetically ascending canonical room alias.
  • id β€” Sort rooms by alphabetically ascending Matrix room identifier.
  • unread β€” Put unread rooms before other rooms.
  • recent β€” Sort rooms by most recent message timestamp.
  • invite β€” Put invites before other rooms.

πŸŽ€ Example 1: Group room members by their server first πŸŽ€

[settings.sort]
members = ["server", "localpart"]

πŸ’… USER OVERRIDES πŸ’…

The settings.users subsections allows overriding how specific senders are displayed. Overrides are mapped onto Matrix User IDs such as @user:matrix.org, and are typically written as inline tables containing the following keys:

  • name β€” Change the display name of the user.
  • color β€” Change the color the user is shown as. Possible values are: "black", "blue", "cyan", "dark-gray", "gray", "green", "light-blue", "light-cyan", "light-green", "light-magenta", "light-red", "light-yellow", "magenta", "none", "red", "white", and "yellow".

🌸 Example 1: Override how @ada:example.com appears in chat 🌸

[settings.users]
"@ada:example.com" = { name = "Ada Lovelace", color = "light-red" }

✨ STARTUP LAYOUT ✨

Okay so the layout section is literally the β€œwhat tabs and windows do I wake up to?” zone β€” it configures the initial set of tabs and windows to show when starting the client. πŸ’–

  • style β€” Specifies what window layout to load when starting. Valid values are "restore" to restore the layout from the last time the client was exited, "new" to open a single window (uses the value of default_room if set), or "config" to open the layout described under tabs.
  • tabs β€” If style is set to config, then this value will be used to open a set of tabs and windows at startup. Each object can contain either a window key specifying a username, room identifier or room alias to show, or a split key specifying an array of window objects.

Example 1: Show a single room every startup

[settings]
default_room = "#iamb-users:0x.badd.cafe"

[layout]
style = "new"

Example 2: Show a specific layout every startup

[layout]
style = "config"

[[layout.tabs]]
window = "iamb://dms"

[[layout.tabs]]
window = "iamb://rooms"

[[layout.tabs]]
split = [
    { "window" = "#iamb-users:0x.badd.cafe" },
    { "window" = "#iamb-dev:0x.badd.cafe" }
]

πŸ”‘ CUSTOM KEYBINDINGS πŸ”‘

The macros subsections allow configuring custom keybindings. Available subsections are:

  • insert, i β€” Map the key sequences in this section in Insert mode.
  • normal, n β€” Map the key sequences in this section in Normal mode.
  • visual, v β€” Map the key sequences in this section in Visual mode.
  • select β€” Map the key sequences in this section in Select mode.
  • command, c β€” Map the key sequences in this section in Visual mode.
  • operator-pending β€” Map the key sequences in this section in Operator Pending mode.

Multiple modes can be given together by separating their names with "|".

Example 1: Use jj to exit Insert mode

[macros.insert]
"jj" = "<Esc>"

Example 2: Use V for switching between message bar and room history

[macros."normal|visual"]
"V" = "<C-W>m"

πŸ“ DIRECTORIES πŸ“

Specifies the directories to save data in. Configured as an object under the key dirs.

  • cache β€” Specifies where to store assets and temporary data in. (For example, image_preview and logs will also go in here by default.) Defaults to $XDG_CACHE_HOME/iamb.
  • data β€” Specifies where to store persistent data in, such as E2EE room keys. Defaults to $XDG_DATA_HOME/iamb.
  • downloads β€” Specifies where to store downloaded files. Defaults to $XDG_DOWNLOAD_DIR.
  • image_previews β€” Specifies where to store automatically downloaded image previews. Defaults to ${cache}/image_preview_downloads.
  • logs β€” Specifies where to store log files. Defaults to ${cache}/logs.

πŸ“‚ FILES πŸ“‚

  • ~/.config/iamb/config.toml β€” The TOML configuration file that iamb loads by default.
  • ~/.config/iamb/config.json β€” A JSON configuration file that iamb will load if the TOML one is not found.
  • /usr/share/iamb/config.example.toml β€” A sample configuration file with examples of how to set different values.

πŸ› REPORTING BUGS πŸ›

Please report bugs in iamb or its manual pages at https://github.com/ulyssa/iamb/issues πŸ’…


πŸ‘€ SEE ALSO πŸ‘€

Extended documentation is available online at https://iamb.chat 🌈

kiss kiss, signed off by the Debian IAMB(5) page, dated Mar 24, 2024 🫢✨

πŸ“¦ where this page comes from