Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ username_display = "username"
indicator = "only-encrypted"
indicator_location = "title|prompt"

[settings.colors]
message_state = "cyan"
message_redacted = "245" # light gray
# commented out because some terminals don't support truecolor
#room_list_unread = "#ff55bb" # pink

[settings.image_preview]
protocol = { type = "sixel", filter = "Nearest" }
size = { "width" = 66, "height" = 10 }
Expand Down
133 changes: 114 additions & 19 deletions docs/iamb.5
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ Specifying this object will replace the upstream defaults and possibly lead to u
Possible keys and their effect are documented at:
.br
.Lk https://docs.rs/matrix-sdk/latest/matrix_sdk/media/struct.MediaRetentionPolicy.html#fields
.It Sy colors
Change the colors of different elements in
.Sy iamb .
See
.Sx "COLORSCHEME"
for details on the format.
.It Sy default_markup
Controls how text in the message bar is interpreted by default.
Possible values are
Expand Down Expand Up @@ -365,6 +371,111 @@ and
Both can be used via
.Dq Sy title|prompt .
.El
.Sh COLORSCHEME
The
.Sy settings.colors
subsection allows configuring the appearance of many elements.
All settings take a color value that is either a named color, an 8-bit color value or a hex value.
The named colors are:
.Dq Sy black ,
.Dq Sy red ,
.Dq Sy green ,
.Dq Sy yellow ,
.Dq Sy blue ,
.Dq Sy magenta ,
.Dq Sy cyan ,
.Dq Sy gray ,
.Dq Sy dark-gray ,
.Dq Sy light-red ,
.Dq Sy light-green ,
.Dq Sy light-yellow ,
.Dq Sy light-blue ,
.Dq Sy light-magenta ,
.Dq Sy light-cyan ,
.Dq Sy white ,
and
.Dq Sy reset ,
The 8-bit ANSI color must in the range of 0 to 255 where the first 16 colors correspond to the named colors.
The hex value is given as
.Dq Sy #RRGGBB .
If the terminal does not support truecolor, all hex colors will fall back to the default text color.
All values must be given as a string.
.Bl -tag -width Ds
.It Sy border
The border of the focused buffer.
Defaults to the terminal foreground color.
.It Sy border_unfocused
The border of all unfocused buffers.
Defaults to
.Sy border .
Note that this value is dimmed before use.
.It Sy window_title
The text at the top-left of the border.
Defaults to the terminal foreground color.
Note that this value is dimmed for unfocused buffers.
.It Sy tab_title
The active entry in the tab list.
Defaults to the terminal foreground color.
.It Sy tab_title_unfocused
The inactive entries in the tab list.
Defaults to
.Sy tab_title .
Note that this value is dimmed before use.
.It Sy room_list
Entry in a room list like the
.Dq Sy :chats
window.
Defaults to the terminal foreground color.
.It Sy room_list_unread
Unread entry in a room list.
Defaults to
.Sy room_list .
.It Sy message_time
The timestamp to the right of messages.
Defaults to the terminal foreground color.
.It Sy message_date
The date divider between different days in the message scrollback.
Defaults to the terminal foreground color.
Note that this value is used in bold with might make it brighter on some terminals.
.It Sy message_normal
The text color for text messages.
Defaults to the terminal foreground color.
.It Sy message_state
The text color for state events like users joining rooms.
Defaults to
.Sy message_normal .
.It Sy message_sticker
The text color for stickers.
Defaults to
.Sy message_normal .
.It Sy message_redacted
The text color for redacted (deleted) messages.
Defaults to
.Sy message_normal .
.It Sy message_poll
The text color for polls.
Defaults to
.Sy message_normal .
.It Sy message_notice
The text color for automated messages.
Defaults to
.Sy message_state .
.It Sy message_other
The text color for other (mostly unsupported) message types.
Defaults to
.Sy message_normal .
.It Sy codeblock_background
Background color for code blocks in messages.
Defaults to
.Dq Sy 236
(a dark shade of gray).
.El
.Ss Example: Make the code background a lighter gray and change the color of state events.
.Bd -literal -offset indent
[settings.colors]
codeblock_background = "245"
message_state = "cyan"
.Ed
.Sh IMAGE PREVIEWS
The
.Sy settings.image_preview
Expand Down Expand Up @@ -642,25 +753,9 @@ and are typically written as inline tables containing the following keys:
Change the display name of the user.
.It Sy color
Change the color the user is shown as.
Possible values are:
.Dq Sy black ,
.Dq Sy blue ,
.Dq Sy cyan ,
.Dq Sy dark-gray ,
.Dq Sy gray ,
.Dq Sy green ,
.Dq Sy light-blue ,
.Dq Sy light-cyan ,
.Dq Sy light-green ,
.Dq Sy light-magenta ,
.Dq Sy light-red ,
.Dq Sy light-yellow ,
.Dq Sy magenta ,
.Dq Sy none ,
.Dq Sy red ,
.Dq Sy white ,
and
.Dq Sy yellow .
See the introduction of
.Sx "COLORSCHEME"
for the supported color format.
.El
.Ss Example 1: Override how @ada:example.com appears in chat
.Bd -literal -offset indent
Expand Down
Loading
Loading