Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

config.toml Reference

The main configuration file controlling Two-Face’s behavior, connection settings, and general preferences.

Location

~/.two-face/config.toml


Complete Reference

#
# Two-Face Configuration
#

[connection]
# Default host for Lich proxy mode
host = "127.0.0.1"

# Default port for Lich proxy mode
port = 8000

# Default character name (used for profile loading)
character = ""

# Timeout for connection attempts (seconds)
timeout = 30

[interface]
# Enable clickable links in game text
links = true

# Show window borders by default
show_borders = true

# Default border style: "plain", "rounded", "double", "thick"
border_style = "rounded"

# Mouse support
mouse = true

# Scroll speed (lines per scroll event)
scroll_speed = 3

# Command history size
history_size = 1000

[sound]
# Enable sound effects
enabled = true

# Master volume (0.0 - 1.0)
volume = 0.8

# Play startup music
startup_music = true

# Sound file paths (relative to data dir or absolute)
# alert_sound = "sounds/alert.wav"

[tts]
# Enable text-to-speech
enabled = false

# TTS rate (words per minute, platform dependent)
rate = 150

# Which streams to speak
streams = ["main"]

# Speak room descriptions
speak_rooms = true

# Speak player speech
speak_speech = true

[logging]
# Log level: "error", "warn", "info", "debug", "trace"
level = "warn"

# Log file path (relative to data dir)
file = "two-face.log"

# Log to console (for debugging)
console = false

[behavior]
# Auto-scroll to bottom on new text
auto_scroll = true

# Flash window on important events
flash_on_alert = false

# Notification sound on important events
sound_on_alert = false

# Pause input during roundtime (experimental)
pause_on_rt = false

[performance]
# Maximum lines to buffer per text window
max_buffer_lines = 2000

# Frame rate target
target_fps = 60

# Enable performance metrics collection
collect_metrics = true

Section Details

[connection]

Controls how Two-Face connects to the game.

KeyTypeDefaultDescription
hoststring"127.0.0.1"Host for Lich proxy mode
portinteger8000Port for Lich proxy mode
characterstring""Default character name for profiles
timeoutinteger30Connection timeout in seconds

Note: Direct mode (--direct) ignores these settings and uses command-line credentials.

[interface]

Visual and interaction settings.

KeyTypeDefaultDescription
linksbooleantrueEnable clickable game links
show_bordersbooleantrueShow window borders by default
border_stylestring"rounded"Default border style
mousebooleantrueEnable mouse support
scroll_speedinteger3Lines scrolled per mouse wheel tick
history_sizeinteger1000Command history entries to remember

Border styles:

  • "plain" - Single line: ─│─│┌┐└┘
  • "rounded" - Rounded corners: ─│─│╭╮╰╯
  • "double" - Double line: ═║═║╔╗╚╝
  • "thick" - Thick line: ━┃━┃┏┓┗┛

[sound]

Audio settings.

KeyTypeDefaultDescription
enabledbooleantrueMaster sound toggle
volumefloat0.8Master volume (0.0 to 1.0)
startup_musicbooleantruePlay music on launch

Note: Requires the sound feature to be compiled in.

[tts]

Text-to-speech accessibility features.

KeyTypeDefaultDescription
enabledbooleanfalseEnable TTS
rateinteger150Speech rate (WPM)
streamsarray["main"]Streams to speak
speak_roomsbooleantrueSpeak room descriptions
speak_speechbooleantrueSpeak player dialogue

Supported streams: "main", "speech", "thoughts", "combat"

[logging]

Diagnostic logging configuration.

KeyTypeDefaultDescription
levelstring"warn"Minimum log level
filestring"two-face.log"Log file path
consolebooleanfalseAlso log to console

Log levels (from least to most verbose):

  • "error" - Only errors
  • "warn" - Errors and warnings
  • "info" - Normal operation info
  • "debug" - Debugging details
  • "trace" - Very verbose tracing

[behavior]

Client behavior tweaks.

KeyTypeDefaultDescription
auto_scrollbooleantrueAuto-scroll on new text
flash_on_alertbooleanfalseFlash window on alerts
sound_on_alertbooleanfalsePlay sound on alerts
pause_on_rtbooleanfalsePause input during RT

[performance]

Performance tuning.

KeyTypeDefaultDescription
max_buffer_linesinteger2000Max lines per text window
target_fpsinteger60Target frame rate
collect_metricsbooleantrueEnable performance stats

Examples

Minimal Config

[connection]
port = 8000
character = "MyCharacter"

High-Performance Config

[performance]
max_buffer_lines = 1000
target_fps = 120
collect_metrics = false

[interface]
links = false  # Disable link parsing for speed

Accessibility Config

[tts]
enabled = true
rate = 175
streams = ["main", "speech"]
speak_rooms = true
speak_speech = true

[interface]
scroll_speed = 5

Environment Variable Overrides

Some settings can be overridden via environment variables:

VariableOverrides
TWO_FACE_DIRData directory location
RUST_LOGLogging level
COLORTERMTerminal color support

See Also