dx uses config.toml (or config.yaml/config.json) files to customize behavior. Configuration can be set globally (~/.dx/config.toml) or per-project (./config.toml).

Configuration Files

dx looks for configuration in this order:
  1. Local project: config.toml, config.yaml, or config.json in current directory
  2. Global: ~/.dx/config.toml, ~/.dx/config.yaml, or ~/.dx/config.json
Project configuration overrides global settings when allow_project_override is true (default).

Basic Settings

allow_project_override
boolean
default:"true"
Allow local ./config.toml to override global ~/.dx/config.toml settings.
markdown_enabled
boolean
default:"true"
Enable global Markdown rendering. Can be toggled per-file with m key.
output_dim
boolean
default:"true"
Dim baseline text in output view for better readability.
show_fps
boolean
default:"true"
Display FPS counter in status bar for performance monitoring.

MOTD Settings

motd_wrap
boolean
default:"true"
Enable soft-wrap for MOTD Markdown content.
motd_color
string
Hex color for MOTD text. Examples: "#3B82F6", "#10B981"

Theme Settings

theme
string
default:"dark"
Base color theme. Options: "dark" or "light"
theme_file
string
Path to external YAML theme file (should end with .dx-theme)
theme_overrides
object
Key-value pairs to override specific theme tokens
[theme_overrides]
primary = "#FF6B6B"
background = "#1A1A1A"
theme_dir
string
Directory containing *.dx-theme files for theme selection

Status Bar

status
object
Configuration for the bottom status bar
Example:
[status]
text = "dx v2.0"
# or
command = "date '+%H:%M'"

Telemetry

telemetry
object
Optional telemetry for failed command logs
Example:
[telemetry]
enabled = true
endpoint = "https://api.example.com/telemetry"

Auto-Update

update
object
Automatic build and relaunch configuration
Example:
[update]
on_start = true
build_cmd = "cargo build --release"
relaunch_path = "target/release/dx"
preserve_args = true

Asciinema Integration

asciinema
object
Recording and live streaming configuration
Example:
[asciinema]
enabled = true
external = true
dir = "./recordings"
file_prefix = "session"
title = "dx Session"
quiet = true
overwrite = true

# For live streaming
stream = true
stream_mode = "remote"
remote = "your-stream-id"

Complete Example

# ~/.dx/config.toml (global) or ./config.toml (project)

allow_project_override = true
markdown_enabled = true
output_dim = true
theme = "dark"
show_fps = true
motd_wrap = true
motd_color = "#3B82F6"

[status]
command = "git branch --show-current 2>/dev/null || echo 'not a git repo'"

[telemetry]
enabled = false
endpoint = "https://api.example.com/logs"

[update]
on_start = false
build_cmd = "cargo build --release"
preserve_args = true

[asciinema]
enabled = true
external = true
dir = "../recordings"
file_prefix = "dx"
quiet = true
overwrite = true