This guide will use the winget
CLI tool to install and configure Oh-My-Posh. If you haven't already, I suggest installing Windows Terminal from the Microsoft Store and use Oh-My-Posh with it. If you'd rather not use Windows Terminal for some reason, you can still use Oh-My-Posh with PowerShell. Whichever you choose, check out these instructions to install winget
.
winget install JanDeDobbeleer.OhMyPosh -s winget
Open your PowerShell profile at C:\Users\<your-username>\Documents\Microsoft.PowerShell_profile.ps1
with your preferred text editor as an Administrator and add the following line to the top:
oh-my-posh init pwsh | Invoke-Expression
Save the changes and use the following command to reload your terminal:
. $PROFILE
You should now see the default theme of Oh-My-Posh. If you're satisfied with how it looks, we're done here. If you want to use a different theme, let's continue.
Most themes require a Nerd Font to properly display glyphs and symbols. Oh-My-Posh has a built-in CLI to pick out and install a Nerd Font
oh-my-posh font install
and pick one, it will automatically be downloaded and installed. MesloLGM is the recommended font, but any of them will work.
Use the following command to preview how all the themes will look in the terminal. (Give it a minute, there's a lot of them.)
Get-PoshThemes
The themes are all located at C:\Users\<your-username>\AppData\Local\Programs\oh-my-posh\themes\
. Lets assume you want to use the unicorn
theme. Open Microsoft.PowerShell_profile.ps1
in your editor and change the init script to this:
oh-my-posh init pwsh --config 'C:\Users\<your-username>\AppData\Local\Programs\oh-my-posh\themes\unicorn.omp.json' | Invoke-Expression
And once again, reload your terminal with . $PROFILE
. All done!
Oh-My-Posh comes with many themes that are regularly maintained, but anyone can create a custom theme. Here's a few I've found that I like.
- whoisryosuke's custom theme (Requires
JetBrainsMono
Nerd Font) - Kudostoy0u's pwsh10k theme (Requires
MesloLGS
Nerd Font) - adynetro's custom theme (Requires
MesloLGM
Nerd Font) - Dofoerix's custom themes (In several different colors and designs!)
- rainbowflesh's cyborgone theme
- delacerate's custom theme
- ryanewtaylor's pride theme
- Darkensses's cybershell theme
- drewyh999's custom theme
- sclerp's orangine theme
- SubsTheTechnomancer's not-zork theme (I had to laugh at this one)
- leopoldo109's custom theme
To ensure the glyphs are correctly rendered, you’ll also want to go into Windows Terminal settings, click on Rendering and switch on Use the new text renderer (“AtlasEngine”). If you’re noticing the symbols in some themes are not spaced properly and are right on top of text, be sure you do this step and it should fix the issue.