Man page - meli-themes(5)

Packages contains this manual

Manual


MELI-THEMES (5) File Formats Manual MELI-THEMES (5)

NAME

meli-themes — themes for the meli (1) terminal e-mail client

SYNOPSIS

meli comes with two themes, dark (default) and light .

Custom themes are defined as lists of key-values in the configuration files:
$XDG_CONFIG_HOME/meli/config.toml
$XDG_CONFIG_HOME/meli/themes/*.toml

The application theme is defined in the configuration as follows:

[terminal]
theme = "dark"

DESCRIPTION

Themes for meli are described in the configuration language TOML, as they are key-value tables defined in the TERMINAL section of the configuration file. Each key defines the semantic location of the theme attribute within the application. For example, mail.listing.compact.* keys are settings for the compact mail listing style. A setting contains three fields: fg for foreground color, bg for background color, and attrs for text attribute.

"widget.key.label" = { fg = "Default", bg = "Default", attrs = "Default" }

Each field contains a value, which may be either a color/attribute, a link (key name) or a valid alias. An alias is a string starting with the "$" character and must be declared in advance in the color_aliases or attr_aliases fields of a theme. An alias’ value can be any valid value, including links and other aliases, as long as they are valid. In the case of a link the setting’s real value depends on the value of the referred key. This allows for defaults within a group of associated values. Cyclic references in a theme results in an error:

spooky theme contains a cycle: fg: mail.listing.compact.even -> mail.listing.compact.highlighted -> mail.listing.compact.odd -> mail.listing.compact.even

Two themes are included by default, ‘light’ and ‘dark’.

EXAMPLES

Specific settings from already defined themes can be overwritten:

[terminal]
theme = "dark"

[terminal.themes.dark]
"mail.sidebar_highlighted_account" = { bg = "#ff4529" }
"mail.listing.attachment_flag" = { fg = "#ff4529" }
"mail.view.headers" = { fg = "30" }
"mail.view.body" = {fg = "HotPink3", bg = "LightSalmon1"}
# Linked value keys can be whatever key:
"mail.listing.compact.even_unseen" = { bg = "mail.sidebar_highlighted_account" }
# Linked color value keys can optionally refer to another field:
"mail.listing.compact.odd_unseen" = { bg = "mail.sidebar_highlighted_account.fg" }

# define new theme. Undefined settings will inherit from the default "dark" theme.
[terminal.themes."hunter2"]
color_aliases= { "Jebediah" = "#b4da55" }
"mail.listing.tag_default" = { fg = "$Jebediah" }
"mail.view.headers" = { fg = "White", bg = "Black" }

CUSTOM THEMES

Custom themes can be included in your configuration files or be saved independently in your $XDG_CONFIG_HOME/meli/themes/ directory as TOML files. To start creating a theme right away, you can begin by editing the default theme keys and values:

meli print-default-theme > ˜/.config/meli/themes/new_theme.toml

new_theme.toml will now include all keys and values of the "dark" theme.

meli print-loaded-themes

will print all loaded themes with the links resolved.

VALID ATTRIBUTE VALUES

Case-sensitive.

-

"Default"

-

"Bold"

-

"Dim"

-

"Italics"

-

"Underline"

-

"Undercurl"

-

"Blink"

-

"Reverse"

-

"Hidden"

-

Any combo of the above separated by a bitwise XOR "|" eg "Dim | Italics"

VALID COLOR VALUES

Color values are of type String with the following valid contents:

-

"Default" is the terminal default. (Case-sensitive)

-

Hex triplet e.g. #FFFFFF for RGB colors. Three character shorthand is also valid, e.g. #09c → #0099cc (Case-insensitive)

-

0-255 byte for 256 colors.

-

xterm (1) name but with some modifications (for a full table see COLOR NAMES addendum) (Case-sensitive)

NO COLOR

To completely disable ANSI colors, there are two options:

-

Set the use_color option (section terminal ) to false, which is true by default.

-

The NO_COLOR environmental variable, when present (regardless of its value), prevents the addition of ANSI color. When the configuration value use_color is explicitly set to true by the user, NO_COLOR is ignored.

In this mode, cursor locations (i.e., currently selected entries/items) will use the ‘reverse video’ ANSI attribute to invert the terminal’s default foreground/background colors.

VALID KEYS
-

theme_default

-

error_message

-

highlight

-

status.bar

-

status.command_bar

-

status.history

-

status.history.hints

-

status.notification

-

tab.focused

-

tab.unfocused

-

tab.bar

-

widgets.list.header

-

widgets.form.label

-

widgets.form.field

-

widgets.form.highlighted

-

widgets.options.highlighted

-

mail.sidebar

-

mail.sidebar_divider

-

mail.sidebar_unread_count

-

mail.sidebar_index

-

mail.sidebar_highlighted

-

mail.sidebar_highlighted_unread_count

-

mail.sidebar_highlighted_index

-

mail.sidebar_highlighted_account

-

mail.sidebar_highlighted_account_unread_count

-

mail.sidebar_highlighted_account_index

-

mail.listing.compact.even

-

mail.listing.compact.odd

-

mail.listing.compact.even_unseen

-

mail.listing.compact.odd_unseen

-

mail.listing.compact.even_selected

-

mail.listing.compact.odd_selected

-

mail.listing.compact.even_highlighted

-

mail.listing.compact.odd_highlighted

-

mail.listing.compact.even_highlighted_selected

-

mail.listing.compact.odd_highlighted_selected

-

mail.listing.plain.even

-

mail.listing.plain.odd

-

mail.listing.plain.even_unseen

-

mail.listing.plain.odd_unseen

-

mail.listing.plain.even_selected

-

mail.listing.plain.odd_selected

-

mail.listing.plain.even_highlighted

-

mail.listing.plain.odd_highlighted

-

mail.listing.plain.even_highlighted_selected

-

mail.listing.plain.odd_highlighted_selected

-

mail.listing.conversations

-

mail.listing.conversations.subject

-

mail.listing.conversations.from

-

mail.listing.conversations.date

-

mail.listing.conversations.unseen

-

mail.listing.conversations.highlighted

-

mail.listing.conversations.selected

-

mail.listing.conversations.highlighted_selected

-

mail.view.headers

-

mail.view.headers_names

-

mail.view.headers_area

-

mail.view.body

-

mail.view.thread.indentation.a

-

mail.view.thread.indentation.b

-

mail.view.thread.indentation.c

-

mail.view.thread.indentation.d

-

mail.view.thread.indentation.e

-

mail.view.thread.indentation.f

-

mail.listing.attachment_flag

-

mail.listing.thread_snooze_flag

-

mail.listing.tag_default

-

pager.highlight_search

-

pager.highlight_search_current

COLOR NAMES

Image grohtml-4177128-1.png

Image grohtml-4177128-2.png

Image grohtml-4177128-3.png

Image grohtml-4177128-4.png

Image grohtml-4177128-5.png

Image grohtml-4177128-6.png

Image grohtml-4177128-7.png

Image grohtml-4177128-8.png

Image grohtml-4177128-9.png

SEE ALSO

meli (1), meli.conf (5)

STANDARDS

TOML Standard v.0.5.0 : https://toml.io/en/v0.5.0
NO_COLOR: disabling ANSI color output by default
: https://no-color.org/

AUTHORS

Copyright 2017–2024 Manos Pitsidianakis < manos@pitsidianak.is >

Released under the GPL, version 3 or greater. This software carries no warranty of any kind. (

See COPYING for full copyright and warranty notices. )

Links

Website : https://meli-email.org
Main git repository and issue tracker
: https://git.meli-email.org/meli/meli
Official read-only git mirror on codeberg.org
: https://codeberg.org/meli/meli
Official read-only git mirror on github.com
: https://github.com/meli/meli
meli crate on crates.io
: https://crates.io/crates/meli Debian March 10, 2024 MELI-THEMES (5)