Theming

repartee uses irssi-compatible format strings with 24-bit color support.

Theme files

Themes are TOML files stored in ~/.repartee/themes/. Set the active theme in your config:

[general]
theme = "mytheme"

This loads ~/.repartee/themes/mytheme.theme.

Theme structure

A theme file has two sections: colors and abstracts.

[colors]
bg = "1a1b26"
bg_alt = "24283b"
fg = "a9b1d6"
fg_alt = "565f89"
highlight = "e0af68"
nick_self = "7aa2f7"
timestamp = "565f89"
separator = "3b4261"

[abstracts]
line_start = "{timestamp $Z}{sb_background}"
timestamp = "%Z565f89$*"
own_msg = "{ownmsgnick $0}$1"
pubmsg = "{pubmsgnick $0}$1"
date_separator = "%Z3b4261─── $* ───"
backlog_end = "%Z565f89─── End of backlog ($* lines) ───"

Colors

The [colors] section defines hex RGB values (without #) for UI elements:

KeyDescription
bgMain background color
bg_altAlternate background (topic bar, status line)
fgMain text color
fg_altMuted text color
highlightHighlight/mention color
nick_selfYour own nick color
timestampTimestamp color
separatorBorder/separator color

Abstracts

Abstracts are named format string templates that can reference each other. They control how every UI element is rendered -- from message lines to the status bar.

See Format Strings below for the full format string syntax.

Default theme

If no theme is set, repartee uses built-in defaults with a dark color scheme inspired by Tokyo Night.


Format Strings

repartee implements a full irssi-compatible format string engine with extensions for 24-bit color.

Color codes

24-bit foreground: %Z + RRGGBB

%Z7aa2f7Hello    → "Hello" in blue (#7aa2f7)

24-bit background: %z + RRGGBB

%z1a1b26%Za9b1d6Text    → Light text on dark background

irssi single-letter codes: %X

CodeColor
%k / %KBlack / Dark gray
%r / %RRed / Light red
%g / %GGreen / Light green
%y / %YYellow / Light yellow
%b / %BBlue / Light blue
%m / %MMagenta / Light magenta
%c / %CCyan / Light cyan
%w / %WWhite / Bright white

Style codes

CodeEffect
%_Bold
%/Italic
%-Strikethrough
%UUnderline
%n / %NReset all formatting

Abstracts: {name args}

Abstracts are named templates that expand recursively:

[abstracts]
sb_background = "%z24283b"
timestamp = "%Z565f89$*"
line_start = "{timestamp $Z}{sb_background}"

Usage in another abstract: {timestamp 12:34} expands $* to 12:34.

Variable substitution

SyntaxMeaning
$0 - $9Positional argument
$*All arguments joined
$[N]0Argument padded/truncated to N characters

Example: $[8]0 pads argument 0 to 8 characters (right-aligned by default).

mIRC control characters

repartee also parses mIRC-style control characters in incoming messages:

CharHexEffect
Bold\x02Toggle bold
Color\x03mIRC color code (fg,bg)
Hex color\x04Hex color code
Reset\x0FReset all formatting
Reverse\x16Swap fg/bg
Italic\x1DToggle italic
Strikethrough\x1EToggle strikethrough
Underline\x1FToggle underline

Abstraction depth

Abstracts can reference other abstracts up to 10 levels deep to prevent infinite recursion.