Complete configuration file reference for Two-Face.
File Purpose
config.tomlMain configuration
layout.tomlWidget layout
colors.tomlColor theme
keybinds.tomlKey bindings
highlights.tomlText patterns
triggers.tomlAutomation triggers
[connection]
mode = "lich" # "lich" or "direct"
host = "127.0.0.1" # Lich host (lich mode)
port = 8000 # Lich port (lich mode)
auto_reconnect = true # Auto-reconnect on disconnect
reconnect_delay = 5 # Seconds between reconnect attempts
game = "prime" # Game instance (direct mode)
Key Type Default Description
modestring "lich"Connection mode
hoststring "127.0.0.1"Proxy host
portinteger 8000Proxy port
auto_reconnectboolean trueEnable auto-reconnect
reconnect_delayinteger 5Reconnect delay (seconds)
gamestring "prime"Game instance (direct)
[tts]
enabled = false
engine = "default" # "sapi", "say", "espeak"
voice = "default"
rate = 1.0 # 0.5 to 2.0
volume = 1.0 # 0.0 to 1.0
speak_room_descriptions = true
speak_combat = false
speak_speech = true
speak_whispers = true
speak_thoughts = false
Key Type Default Description
enabledboolean falseEnable TTS
enginestring "default"TTS engine
voicestring "default"Voice name
ratefloat 1.0Speech rate
volumefloat 1.0Volume level
speak_*boolean varies Speak stream types
[logging]
level = "info" # "error", "warn", "info", "debug", "trace"
file = "~/.two-face/two-face.log"
max_size = 10485760 # 10MB
rotate = true
[performance]
render_rate = 60 # Target FPS
batch_updates = true
lazy_render = true
max_scrollback = 10000
[[widgets]]
type = "text" # Widget type (required)
name = "main" # Unique name (required)
x = 0 # X position (0-100)
y = 0 # Y position (0-100)
width = 100 # Width (0-100)
height = 100 # Height (0-100)
# Optional common properties
title = "Main" # Widget title
border = true # Show border
border_color = "white" # Border color
focus_order = 1 # Tab order
visible = true # Initial visibility
[[widgets]]
type = "text"
streams = ["main", "room"]
scrollback = 5000
auto_scroll = true
show_timestamps = false
wrap = true
[[widgets]]
type = "tabbed_text"
tabs = [
{ name = "All", streams = ["main", "room", "combat"] },
{ name = "Combat", streams = ["combat"] },
{ name = "Chat", streams = ["speech", "thoughts"] },
]
[[widgets]]
type = "progress"
data_source = "vitals.health"
color = "health"
show_text = true
show_percentage = true
[[widgets]]
type = "countdown"
data_source = "roundtime"
warning_threshold = 2
critical_threshold = 0
[[widgets]]
type = "compass"
style = "unicode" # "ascii", "unicode", "minimal"
clickable = true
[[widgets]]
type = "indicator"
indicators = ["hidden", "stunned", "prone"]
columns = 2
[[widgets]]
type = "room"
show_exits = true
show_creatures = true
show_players = false
[[widgets]]
type = "command_input"
prompt = "> "
history_size = 500
show_roundtime = true
[theme]
name = "Custom Theme"
# Base colors
background = "#000000"
text = "#ffffff"
text_dim = "#808080"
# Borders
border = "#404040"
border_focused = "#ffffff"
# Vitals
health = "#00ff00"
health_low = "#ffff00"
health_critical = "#ff0000"
mana = "#0080ff"
stamina = "#ff8000"
spirit = "#ff00ff"
# Streams
main = "#ffffff"
combat = "#ff4444"
speech = "#00ffff"
thoughts = "#00ff00"
whisper = "#ff00ff"
room = "#ffff00"
# Indicators
hidden = "#00ff00"
stunned = "#ffff00"
prone = "#00ffff"
Colors accept:
Preset names: "red", "bright_blue"
Hex codes: "#ff0000", "#f00"
[keybinds."key_name"]
action = "action_name" # Widget action
# OR
[keybinds."key_name"]
macro = "game command" # Send command
Category Examples
Letters "a", "z", "A" (shift+a)
Numbers "1", "0"
Function "f1", "f12"
Navigation "up", "down", "left", "right"
Editing "enter", "tab", "backspace", "delete"
Special "escape", "space", "home", "end"
Numpad "numpad0", "numpad_plus"
Combine with +:
"ctrl+a"
"shift+f1"
"alt+enter"
"ctrl+shift+s"
[[highlights]]
pattern = "regex pattern"
fg = "color" # Foreground color
bg = "color" # Background color (optional)
bold = false
italic = false
underline = false
# Optional
enabled = true
priority = 100
fast_parse = false # Use literal matching
[[triggers]]
name = "trigger_name"
pattern = "regex pattern"
command = "action"
# Optional
enabled = true
priority = 100
cooldown = 1000 # Milliseconds
category = "combat"
stream = "main" # Limit to stream
Type Format Example
string Quoted text "value"
integer Whole number 100
float Decimal number 1.5
boolean true/false true
array Brackets ["a", "b"]
table Section [section]