Published on

Set up Windows Terminal with PoshGit, oh-my-posh and Cascadia Code PL

2 min read
Table of Contents

Set up Windows Terminal with PoshGit, oh-my-posh and Cascadia Code PLi

You can watch a videos of how to setup or continue with the post.

IMAGE ALT TEXT HERE

There are few ways to install the window terminal. The easy way is to install from the windows store. There are few other ways available.

Via WinGet (official package manager for Windows):

winget install --id=Microsoft.WindowsTerminal -e

Via Chocolatey:

choco install microsoft-windows-terminal

Via Scoop:

scoop install windows-terminal

Once the terminal is installed then you have to install 2 important powershell modules they are posh-git and oh-my-posh. Make sure you open the terminal as Administrator

Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser

Once module is installed then we have to import the module. We will do this in the powershell profile.

To open the profile type

if (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force }
notepad $PROFILE

The above command will check if the profile is already available. if it is not available then it will create one for you. Once created we can open this in the notepad. once the notepad is opened append the following.

Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox

This will be executed before you open the powershell. we are importing the powershell modules and setting a theme for our powershell.

Now we have to install the font Cascadia Code PL. You can get it from here https://github.com/microsoft/cascadia-code/releases

Once the font is installed you can set the font in the profile settings.

here is the sample

{
    // Make changes here to the powershell.exe profile.
    "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
    "name": "Windows PowerShell",
    "commandline": "powershell.exe",
    "fontFace": "Cascadia Code PL",
    "hidden": false
},