Customize

How to customize Powershell using Oh My Posh

1. Install Microsoft Terminal:

In Windows Terminal - Go to Settings → Appearance → Open JSON

2. Choose a theme:

Add the theme do the SCHEME in the JSON file

What I'm using:

"schemes": 
    [
        {
            "background": "#0C0C0C",
            "black": "#0C0C0C",
            "blue": "#62DA00",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#CCCCCC",
            "green": "#13A10E",
            "name": "Campbell",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },

We are going to use "OH MY POSH"

In order to do that, we need NERD Fonts.

3. Install a Font:

4. Install Oh My Posh

Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://ohmyposh.dev/install.ps1'))

Choose an Oh My Posh theme:

5. Save the configs:

In Windows Terminal - Go to Settings

  • Appearance → Choose the new Theme (from Step 2)

  • Appearance → Font → Choose the new Font (from Step 3)

  • Type "notepad $PROFILE" in PowerShell → add the theme of Oh My Posh (from Step 4)

    oh-my-posh --init --shell pwsh --config ~/AppData/Local/Programs/oh-my-posh/themes/craver.omp.json | Invoke-Expression

The one in the example (craver), It's what I'm using currently

Maybe you need to "bypass" the ExecutionPolicy

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

Results:

My costumized Powershell

Last updated