Oh My Posh configurations use JSON, YAML, or TOML. The configuration is structured around blocks, which contain segments. Each segment has a type (e.g., path, git, node) that determines what information is displayed.
Top-level fields include:
version: Schema version (currently 3).blocks: Array of prompt blocks.final_space: Space at the end of the prompt.console_title_template: Template for the terminal window title.transient_prompt: Configuration for transient prompts.secondary_prompt: Configuration for the secondary prompt.palette: Custom color definitions.cycle: Cycling configuration.
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"version": 3,
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "path",
"style": "powerline",
"powerline_symbol": "\ue0b0",
"foreground": "#ffffff",
"background": "#61afef",
"properties": { "style": "folder" }
}
]
}
]
}