Documentation Index
Fetch the complete documentation index at: https://mintlify.com/heyitsiveen/windows-11/llms.txt
Use this file to discover all available pages before exploring further.
Oh My Posh transforms your PowerShell prompt with git status, execution time, error indicators, and custom segments - all with beautiful theming.
Installation
Winget (Recommended)
Scoop
winget install JanDeDobbeleer.OhMyPosh -s winget
Verify installation:
Refresh PATH
If oh-my-posh command is not found after installation:
$env:PATH = [System.Environment]::GetEnvironmentVariable("PATH", "Machine") + ";" +
[System.Environment]::GetEnvironmentVariable("PATH", "User")
Configuration
Create Theme Directory
New-Item -ItemType Directory -Path "$HOME\.config\oh-my-posh" -Force
PowerShell Integration
Add to conf.d/60-prompt.ps1:
# Oh My Posh Prompt Configuration
if (Get-Command oh-my-posh -ErrorAction SilentlyContinue) {
# Use existing theme from ~/.config/oh-my-posh
$ompThemePath = "$HOME\.config\oh-my-posh"
# Look for theme files in order of preference
$themeFiles = @(
"$ompThemePath\theme.omp.json",
"$ompThemePath\config.omp.json"
)
$selectedTheme = $null
foreach ($themeFile in $themeFiles) {
if (Test-Path $themeFile) {
$selectedTheme = $themeFile
break
}
}
# Fallback to wildcard search
if (-not $selectedTheme) {
$found = Get-ChildItem -Path "$ompThemePath\*.omp.json" -ErrorAction SilentlyContinue | Select-Object -First 1
if ($found) {
$selectedTheme = $found.FullName
}
}
if ($selectedTheme) {
oh-my-posh init pwsh --config $selectedTheme | Invoke-Expression
} else {
# Fallback to built-in theme if no custom theme found
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\agnoster.omp.json" | Invoke-Expression
}
}
Exploring Built-in Themes
List Available Themes
Get-ChildItem $env:POSH_THEMES_PATH
Preview a Theme
Preview any built-in theme without changing your configuration:
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\agnoster.omp.json" | Invoke-Expression
Popular themes:
agnoster.omp.json - Classic minimal theme
paradox.omp.json - Detailed with git info
powerlevel10k_rainbow.omp.json - Colorful powerline
atomic.omp.json - Clean two-line prompt
jandedobbeleer.omp.json - Creator’s personal theme
Creating a Custom Theme
Basic Theme Structure
Create ~/.config/oh-my-posh/theme.omp.json:
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"version": 2,
"final_space": true,
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "path",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#101010",
"background": "#FFC799",
"properties": {
"style": "folder"
}
},
{
"type": "git",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#FFFFFF",
"background": "#90B99F",
"properties": {
"fetch_status": true,
"branch_icon": "\uE0A0 "
}
}
]
},
{
"type": "prompt",
"alignment": "right",
"segments": [
{
"type": "executiontime",
"style": "plain",
"foreground": "#FFCFA8",
"properties": {
"threshold": 500,
"style": "austin"
}
}
]
},
{
"type": "prompt",
"alignment": "left",
"newline": true,
"segments": [
{
"type": "text",
"style": "plain",
"foreground": "#FFC799",
"template": "❯ "
}
]
}
]
}
Vesper Theme Colors
Use these colors in your custom theme to match the Vesper palette:
| Element | Color | Hex |
|---|
| Primary accent | Orange | #FFC799 |
| Secondary accent | Gold | #FFCFA8 |
| Success/Git | Green | #90B99F |
| Warning | Yellow | #E6B99D |
| Error | Red | #F5A191 |
| Foreground | White | #FFFFFF |
| Background | Dark | #101010 |
| Muted | Gray | #505050 |
Popular Segments
{
"type": "path",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#101010",
"background": "#FFC799",
"properties": {
"style": "folder",
"max_depth": 3,
"folder_icon": "\uF07C",
"home_icon": "~"
}
}
{
"type": "git",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#FFFFFF",
"background": "#90B99F",
"properties": {
"fetch_status": true,
"branch_icon": "\uE0A0 ",
"branch_ahead_icon": "↑",
"branch_behind_icon": "↓",
"branch_gone": "✘",
"commit_icon": "@",
"tag_icon": "🏷"
}
}
{
"type": "executiontime",
"style": "plain",
"foreground": "#FFCFA8",
"properties": {
"threshold": 500,
"style": "austin",
"always_enabled": false
}
}
{
"type": "exit",
"style": "plain",
"foreground": "#F5A191",
"properties": {
"always_enabled": true,
"error_icon": "✘",
"success_icon": ""
}
}
{
"type": "battery",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#FFFFFF",
"background": "#E6B99D",
"properties": {
"charged_icon": "\uF240",
"charging_icon": "\uF0E7",
"discharging_icon": "\uF243"
}
}
{
"type": "node",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#101010",
"background": "#90B99F",
"properties": {
"fetch_version": true,
"display_mode": "files"
}
}
Theme Styles
Classic powerline style with connected segments:"style": "powerline",
"powerline_symbol": "\uE0B0"
Simple text without backgrounds: Segments with leading/trailing icons:"style": "diamond",
"leading_diamond": "\uE0B6",
"trailing_diamond": "\uE0B4"
Testing Your Theme
Test theme changes immediately:
oh-my-posh init pwsh --config "$HOME\.config\oh-my-posh\theme.omp.json" | Invoke-Expression
Or reload your PowerShell profile:
Exporting Theme Configuration
Export current theme to customize it:
oh-my-posh config export --config "$env:POSH_THEMES_PATH\agnoster.omp.json" --output "$HOME\.config\oh-my-posh\mytheme.omp.json"
Troubleshooting
Install a Nerd Font:scoop install nerd-fonts/JetBrainsMono-NF
Configure your terminal to use the Nerd Font in WezTerm:config.font = wezterm.font 'JetBrains Mono'
Check if Oh My Posh is in PATH:Verify theme file exists:Test-Path "$HOME\.config\oh-my-posh\theme.omp.json"
Disable expensive segments like git status fetching:"properties": {
"fetch_status": false
}
Or increase cache timeout:"properties": {
"fetch_status": true,
"cache_timeout": 10
}
Advanced Configuration
Show segments only in specific contexts:{
"type": "python",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#FFFFFF",
"background": "#ACA1CF",
"properties": {
"display_mode": "files",
"fetch_virtual_env": true
}
}
This only appears when Python files are detected in the current directory.