Configuration methods
Draconis++ supports two configuration approaches:TOML configuration
Runtime configuration using TOML files. Flexible and easy to modify without recompiling.
Precompiled configuration
Compile-time configuration using C++ headers. Creates a fully portable binary with no external dependencies.
TOML configuration is the default. Precompiled configuration requires enabling
DRAC_PRECOMPILED_CONFIG during build.TOML configuration
Configuration file location
Draconis++ looks for configuration files in platform-specific locations:- Linux
- macOS
- Windows
Basic TOML structure
A typical TOML configuration file includes these sections:General settings
Display name shown in the greeting. If not specified, automatically detects from the system username.
Language code for localization. Supported values:
en, es, fr, de.Logo configuration
Customize the logo display with inline images or ASCII art.Path to an image file to display. Leave empty to use ASCII art.
Image rendering protocol. Valid values:
kitty- Kitty terminal graphics protocolkitty-direct- Kitty direct renderingiterm2- iTerm2 inline images
Logo width in pixels.
Logo height in pixels. Set to 0 to auto-calculate from aspect ratio.
UI layout configuration
Define which information to display and how to organize it.Available row keys
Built-in row keys
Built-in row keys
| Key | Description |
|---|---|
date | Current date and time |
host | Hostname |
os | Operating system name and version |
kernel | Kernel version |
cpu | CPU model and specifications |
gpu | GPU information |
ram | RAM usage (used / total) |
disk | Disk usage |
uptime | System uptime |
shell | Current shell |
packages | Package manager counts |
de | Desktop environment |
wm | Window manager |
playing | Currently playing media |
Plugin row keys
Plugin row keys
Plugin keys use the format
plugin.<name> where <name> is the plugin identifier.Examples:plugin.weather- Weather informationplugin.spotify- Spotify now playingplugin.custom- Custom plugin data
Row customization
Data key identifying what information to display.
Custom label override. If not specified, uses the default label.
Custom icon override. If not specified, uses the default icon.
Value foreground color. Supported color names depend on the terminal.
Enable automatic word wrapping for long values.
Package manager configuration
When built withDRAC_ENABLE_PACKAGECOUNT, you can configure which package managers to query.
- Linux
- macOS
- Windows
pacman(Arch)apt(Debian/Ubuntu)dnf(Fedora)flatpaksnapnixcargonpm
Plugin configuration
When built withDRAC_ENABLE_PLUGINS, configure plugins in the [plugins] section.
Complete TOML example
Precompiled configuration
Precompiled configuration embeds all settings directly into the binary, creating a fully portable executable with no external dependencies.Enable precompiled configuration
Configure the build with precompiled config enabled:Configuration file
Copy the example configuration header:config.hpp with your settings. This file is located in the root of the source directory.
Basic structure
Username configuration
Logo configuration
Layout configuration
Define rows and groups using theRow() and Group() helpers:
Custom labels and icons
The array size in the template parameter (e.g.,
std::array<..., 3>) must match the actual number of elements in the initializer list.Package manager configuration
WhenDRAC_ENABLE_PACKAGECOUNT is enabled:
Plugin configuration
WhenDRAC_ENABLE_PLUGINS is enabled, configure plugins directly:
Static plugins
With precompiled config and static plugins, create a fully portable binary:Logo customization
Supported image protocols
Draconis++ supports multiple terminal image protocols:- Kitty
- Kitty Direct
- iTerm2
The Kitty terminal graphics protocol provides high-quality image rendering.Works with: Kitty, WezTerm, Konsole (with plugin)
Image requirements
- Formats: PNG, JPEG, GIF (depends on terminal support)
- Size: Any size (will be scaled to specified dimensions)
- Transparency: Supported in PNG format
Logo sizing
Fallback to ASCII art
If the terminal doesn’t support the specified protocol, Draconis++ automatically falls back to ASCII art.Examples
Minimal configuration
Custom logo setup
Multi-language setup
Complete layout customization
Troubleshooting
Configuration file not found
Configuration file not found
Run
draconis++ --show-config-path to see where Draconis++ expects the configuration file.Create the directory if it doesn’t exist:Logo not displaying
Logo not displaying
Check:
- Your terminal supports the specified protocol (Kitty, iTerm2)
- The image file exists and is readable
- The path is absolute, not relative
- Try a different protocol:
--logo-protocol kittyor--logo-protocol iterm2
TOML parse errors
TOML parse errors
Validate your TOML syntax:Common issues:
- Missing quotes around strings
- Incorrect table syntax
- Duplicate keys
Precompiled config not used
Precompiled config not used
Verify the build was configured with precompiled config:Should output:If not, rebuild with:
See also
CLI overview
Introduction to the Draconis++ CLI tool.
Command reference
Complete reference for all CLI flags and options.