Commit 8b74938c8a

8b74938c8a5042cf3c761ba57f0b4140f3c73702

parent: ddf3bb2947

Unregistered key

Ulyssa <git@ulyssa.dev> · 2026-10-05 01:02 UTC
committer: <noreply@github.com>

Add `config.basic.toml` and rename example config to `config.full.toml` (#782)

Layout: unified · split

PACKAGING.md +2 −1
@@ -32,7 +32,8 @@ you'll want to install as part of a package:
3232| Repository Path | Installed Path (may vary per OS) |
3333| ----------------------- | ----------------------------------------------- |
3434| /iamb.desktop | /usr/share/applications/iamb.desktop |
35| /config.example.toml | /usr/share/iamb/config.example.toml |
35| /config.basic.toml | /usr/share/iamb/config.basic.toml |
36| /config.full.toml | /usr/share/iamb/config.full.toml |
3637| /docs/iamb-256x256.png | /usr/share/icons/hicolor/256x256/apps/iamb.png |
3738| /docs/iamb-512x512.png | /usr/share/icons/hicolor/512x512/apps/iamb.png |
3839| /docs/iamb.svg | /usr/share/icons/hicolor/scalable/apps/iamb.svg |
config.basic.toml added +10
@@ -0,0 +1,10 @@
1# ==============================================================================
2# This is an example of a basic `config.toml` for iamb.
3#
4# Reference iamb(5) or <https://iamb.chat> for the options you can set here.
5# ==============================================================================
6[profiles.default]
7user_id = "@user:matrix.org"
8
9[settings]
10ignorecase = true
config.example.toml → config.full.toml renamed +28 −3
@@ -1,13 +1,27 @@
1# ==============================================================================
2# NOTE: This file demonstrates using most of the configuration options in iamb!
3#
4# While some of the options in here are set to their defaults, many of them are
5# not and might not actually be what you want to use!
6#
7# If you want to start with something simple, use `config.basic.toml` and add
8# things in one-by-one as you need them.
9# ==============================================================================
110default_profile = "default"
211
12# Specify a user profile to log in as.
13#
14# Usually `user_id` is sufficient, and you will be prompted for a password at
15# startup, but you can use `url` to override the typical homeserver discovery,
16# and `password_file` to avoid being prompted for a password at login.
317[profiles.default]
418user_id = "@user:matrix.org"
519password_file = "/path/to/password"
6url = "https://matrix.org"
20url = "https://matrix-client.matrix.org"
721
822[settings]
9default_markup = "html"
10default_register = "+"
23default_markup = "markdown"
24default_register = "\""
1125default_room = "#iamb-users:0x.badd.cafe"
1226default_split = "vertical"
1327external_edit_file_suffix = ".md"
@@ -29,31 +43,38 @@ typing_notice_send = true
2943user_gutter_width = 30
3044username_display = "username"
3145
46# Settings related to the encryption indicator:
3247[settings.encryption]
3348indicator = "only-encrypted"
3449indicator_location = "title|prompt"
3550
51# Settings related to showing image previews in the terminal:
3652[settings.image_preview]
3753protocol = { type = "sixel", filter = "Nearest" }
3854size = { "width" = 66, "height" = 10 }
3955
56# Settings related to proxying homeserver requests:
4057[settings.proxy]
4158url = "" # An empty string disables any proxying
4259auth = "Bearer abcd1234"
4360headers.X-Proxy-Config = "foobar"
4461
62# Settings related to overriding how lists of rooms are sorted:
4563[settings.sort]
4664rooms = ["favorite", "lowpriority", "unread", "name"]
4765members = ["power", "id"]
4866
67# Settings related to how iamb interacts with the terminal:
4968[settings.terminal]
5069cursor_shape = "default"
5170enable_extended_keys = false
5271enable_title = true
5372
73# Settings related to overriding how specific users are shown:
5474[settings.users]
5575"@user:matrix.org" = { "name" = "John Doe", "color" = "magenta" }
5676
77# Specify a specific tab and window layout to use every time iamb starts:
5778[layout]
5879style = "config"
5980
@@ -69,12 +90,14 @@ split = [
6990 { "window" = "#iamb-dev:0x.badd.cafe" }
7091]
7192
93# Map specific key inputs to other keys:
7294[macros.insert]
7395"jj" = "<Esc>"
7496
7597[macros."normal|visual"]
7698"V" = "<C-W>m"
7799
100# Map command aliases to to other commands:
78101[aliases]
79102"c" = "chats"
80103"d" = "download"
@@ -85,11 +108,13 @@ split = [
85108"ca" = "cancel"
86109"red" = "redact"
87110
111# Specify different directories to use instead of the system defaults:
88112[dirs]
89113cache = "/home/user/.cache/iamb/"
90114logs = "/home/user/.local/share/iamb/logs/"
91115downloads = "/home/user/Downloads/"
92116
117# Override default colors:
93118[theme]
94119timeline.state.color = "cyan"
95120timeline.redacted.color = "245" # light gray
docs/iamb.5 +4 −2
@@ -1146,8 +1146,10 @@ loads by default.
11461146A JSON configuration file that
11471147.Sy iamb
11481148will load if the TOML one is not found.
1149.It Pa /usr/share/iamb/config.example.toml
1150A sample configuration file with examples of how to set different values.
1149.It Pa /usr/share/iamb/config.basic.toml
1150A sample configuration file showing the basic values needed to get started.
1151.It Pa /usr/share/iamb/config.basic.toml
1152A sample configuration file with examples of how to set many different values.
11511153.El
11521154.Sh "REPORTING BUGS"
11531155Please report bugs in
src/config/mod.rs +3 −3
@@ -135,7 +135,7 @@ fn deserialize_register<'de, D>(deserializer: D) -> Result<Option<Register>, D::
135135where
136136 D: serde::de::Deserializer<'de>,
137137{
138 let r = <&'de str>::deserialize(deserializer)?;
138 let r = String::deserialize(deserializer)?;
139139
140140 if r.len() > 1 {
141141 return Err(D::Error::custom("expected a single character to specify a register"));
@@ -1972,8 +1972,8 @@ mod tests {
19721972
19731973 #[test]
19741974 fn test_load_example_config_toml() {
1975 let path = PathBuf::from("config.example.toml");
1976 let config = IambConfig::load_toml(&path).expect("can load example_config.toml");
1975 let path = PathBuf::from("config.full.toml");
1976 let config = IambConfig::load_toml(&path).expect("can load config.full.toml");
19771977
19781978 let IambConfig {
19791979 profiles,