Configuration
Configuration File
leaf reads configuration from ~/.config/leaf/config.toml (Linux/macOS) or %APPDATA%\leaf\config.toml (Windows).
On Linux/macOS, $XDG_CONFIG_HOME/leaf/config.toml is used if set.
Open it with:
leaf --config
Reset to defaults:
leaf --config reset
Remove the configuration directory entirely:
leaf --config remove
Options
# Default theme: arctic, forest, ocean, solarized-dark
# Can also be a path to a custom .toml theme file
theme = "ocean"
# theme = "./theme/my-theme.toml"
# Default editor for Ctrl+E. Supports {$path} and {$line} placeholders.
editor = "nano"
# editor = 'nvim +{$line} +"normal! zz"'
# Enable watch mode by default
watch = false
# Maximum content width in columns (min: 20, default: terminal width)
width = 80
# Extra file extensions to show in the picker
extras = ["txt", "rs"]
# File picker width (percentage or absolute column count)
file-picker-width = "75%"
# Show line numbers inside fenced code blocks
code-line-numbers = true
# Terminal tab title truncation (min: 20, -1 = no truncation)
tab-title-length = -1
All settings are optional. CLI flags always override config file values.
Precedence
- Command-line flags (highest priority)
LEAF_*environment variables- Config file (
config.toml) - Platform default
This applies uniformly to editor, theme, and width.
Environment Variables
| Variable | Description |
|---|---|
LEAF_EDITOR | Override editor selection |
LEAF_THEME | Override theme selection |
LEAF_WIDTH | Override content width |
XDG_CONFIG_HOME | Config directory (default: ~/.config) |