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:
Local project : config.toml
, config.yaml
, or config.json
in current directory
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 local ./config.toml
to override global ~/.dx/config.toml
settings.
Enable global Markdown rendering. Can be toggled per-file with m
key.
Dim baseline text in output view for better readability.
Display FPS counter in status bar for performance monitoring.
MOTD Settings
Enable soft-wrap for MOTD Markdown content.
Hex color for MOTD text. Examples: "#3B82F6"
, "#10B981"
Theme Settings
Base color theme. Options: "dark"
or "light"
Path to external YAML theme file (should end with .dx-theme
)
Key-value pairs to override specific theme tokens [ theme_overrides ]
primary = "#FF6B6B"
background = "#1A1A1A"
Directory containing *.dx-theme
files for theme selection
Status Bar
Configuration for the bottom status bar Static text to display in status bar
Command to run for dynamic status updates (outputs one line)
Example:
[ status ]
text = "dx v2.0"
# or
command = "date '+%H:%M'"
Telemetry
Optional telemetry for failed command logs Enable sending failed command logs to endpoint
HTTP endpoint for telemetry POST requests
Example:
[ telemetry ]
enabled = true
endpoint = "https://api.example.com/telemetry"
Auto-Update
Automatic build and relaunch configuration Build and relaunch dx on startup
build_cmd
string
default: "cargo build --release"
Command used for building before relaunch
Path to executable for relaunch (defaults to target/release/dx
)
Reuse current CLI arguments on relaunch
Example:
[ update ]
on_start = true
build_cmd = "cargo build --release"
relaunch_path = "target/release/dx"
preserve_args = true
Asciinema Integration
Recording and live streaming configuration Master switch for asciinema integration
Wrap external (passthrough) commands with asciinema
Wrap update relaunch sessions with asciinema
Directory to save recordings (defaults to current directory)
Filename prefix; final name becomes <prefix>-<unix_timestamp>.cast
Recording title shown by asciinema
Quiet mode (suppresses asciinema prompts)
Overwrite existing recording files
Use live streaming instead of recording
Streaming mode: "remote"
or "local"
For local mode: address like "127.0.0.1:9000"
For remote mode: STREAM-ID or WebSocket URL
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