Categories
Windows Without Category

Setting up oh-my-posh v3 for Windows Terminal

After a fresh installation of the new OS Windows 11 I had to re-setup oh-my-posh for Windows terminal. There are already a lot of descriptions out there ‒ one of the best from Scott Hanselman ‒ so this should only be a little reminder for me and not an extensive description.

Please note: this description of for version 3 of o-my-posh!

Install correct font

Because oh-my-posh uses font icons, it’s important to install a corresponding font from NERD FONTS. In my case it’s Caskaydia Cove Nerd Font.

Setup oh-my-posh

1. Open Windows terminal and ensure that PowerShell is default

2. Install oh-my-posh

Install-Module oh-my-posh -Scope CurrentUser

3. Install Git support

Install-Module posh-git -Scope CurrentUser

4. Edit PowerShell Profile

code $PROFILE

Add the following content:

Import-Module posh-git
Import-Module oh-my-posh
Set-PoshPrompt -Theme paradox


# Or if you have a custom style, you can reference the json file
Set-PoshPrompt -Theme ~/Documents/WindowsPowerShell/blub.omp.json

5. Press CTRL + SHIFT + , for editing the Windows terminal settings in order to setup the correct font. Under profiles section you can find the defaults section. There you have to setup the font face as the following:

{
    "profiles": 
    {
        "defaults": 
        {
            "font": 
            {
                "face": "CaskaydiaCove NF"
            }
        }
    }
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha * Time limit is exhausted. Please reload CAPTCHA.