Installation

1. Setup your terminal

Terminal

While Oh my Posh works on the standard terminal, we advise using the Windows Terminal.

Font

To see the icons displayed in Oh my Posh, install and configure your terminal to use a powerline enabled font. The fonts we use are patched by Nerd Fonts, which offer a maximum of icons you can use.

Oh my Posh was designed using Meslo LGM NF, but any Nerd Font should be compatible with the standard themes.

Windows fonts

Make sure to install fonts system wide to avoid seeing rectangles in your terminal. See this thread for more context.

2. Download the latest binary

PowerShell

There's a PowerShell module that contains all of the functionality below and makes installation a breeze. If you're not looking to use Oh my Posh outside of PowerShell, have a look at the module rather than continue reading here.

Scoop

A Scoop package is available to assist installs on Windows.

Manual

mkdir C:\tools
Invoke-Webrequest https://github.com/JanDeDobbeleer/oh-my-posh3/releases/latest/download/posh-windows-amd64.exe -OutFile C:\tools\oh-my-posh.exe

3. Download the themes

Scoop

When using Scoop, all themes are downloaded as well.

Manual

mkdir ~\.poshthemes
Invoke-Webrequest https://github.com/JanDeDobbeleer/oh-my-posh3/releases/latest/download/themes.zip -OutFile ~\.poshthemes\themes.zip
Expand-Archive ~\.poshthemes\themes.zip -DestinationPath ~\.poshthemes -Force
Remove-Item ~\.poshthemes\themes.zip

Preview the themes

When using Scoop, replace "~\.poshthemes\*" with "$(scoop prefix oh-my-posh)/themes/*"

Get-ChildItem -Path "~\.poshthemes\*" -Include '*.omp.json' | Sort-Object Name | ForEach-Object -Process {
$esc = [char]27
Write-Host ""
Write-Host "$esc[1m$($_.BaseName)$esc[0m"
Write-Host ""
& "C:\tools\oh-my-posh.exe" -config $($_.FullName) -pwd $PWD
Write-Host ""
}

4. Replace your existing prompt

If you have no idea which shell you're currently using, Oh my Posh has a utility switch that will you tell you.

oh-my-posh --print-shell

Add the following to ~/.zshrc:

eval "$(oh-my-posh --init --shell zsh --config ~/.poshthemes/jandedobbeleer.omp.json)"

Once added, reload your profile for the changes to take effect.

source ~/.zshrc

5. Next steps

At this point you're good to go. The jandedobbeleer.omp.json theme displays most common use-cases in your prompt so 9/10 you'll be more than happy with it. However, if you want to explore additional functionality, going through the additional steps below will help you get started.

Change the theme

We downloaded all the themes and set jandedobbeleer.omp.json as the one to use. However, there are a lot more to be discovered and maybe there are some you like better.

Adjust your configuration to use any other theme from the folder we created (~/.poshthemes).

Override the theme settings

Maybe there's a theme you like, but you don't fancy the colors. Or, maybe there's a segment you want to tweak/add, or replace some of the icons with a different one. Whatever the case, read through all available options first, by starting with the configuration guide.

Afterwards, the easiest way to go about this is to print the current config and store it elsewhere first (for example ~/.mytheme.omp.json).

oh-my-posh --print-config

This will write the current configuration in your shell, allowing you to copy paste it in a new file and store it somehwere. Once adjusted to your liking, change the prompt setting to use the newly created file.

oh-my-posh --config ~/.mytheme.omp.json

๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰