DEV Community

Vipul Dessai
Vipul Dessai

Posted on

Oh my posh on all windows terminals (vs code integrated terminal too!!)

vs code integrated terminal with oh my posh

First install the 'oh my posh' on your windows machine, by either visiting this or use the below command.



winget install JanDeDobbeleer.OhMyPosh -s winget


Enter fullscreen mode Exit fullscreen mode

Install fonts

NOTE - you can try any font but 'Meslo' worked well for '1_shell' theme

Install the theme - [official documentation]

  • for example I'll use '1_shell' theme
  • open the terminal and run the following command ```

oh-my-posh init pwsh --config ~/.1_shell.omp.json | Invoke-Expression

- restart the terminal

## Create a profile for your terminal [[official documentation](https://ohmyposh.dev/docs/installation/prompt)]
- open the terminal
- create a new profile by running the following command 
Enter fullscreen mode Exit fullscreen mode

notepad $PROFILE'
or
New-Item -Path $PROFILE -Type File -Force

* this will create a file, so add the below line to it, and save it
Enter fullscreen mode Exit fullscreen mode

oh-my-posh init pwsh | Invoke-Expression


## Modify the settings.json of the terminal
- open the terminal as an admin user
- press CTRL + SHIFT + ,
- this will open or prompt to select your favorite editor for the 'settings.json'
Enter fullscreen mode Exit fullscreen mode

"profiles":
{
"defaults": {
"font":
{
"face": "MesloLGM NF"
}
}
...

- save it

## Modify the settings of VS code integrated terminal
- go to File -> Preferences -> Settings 
- search for @feature:terminal font
- add the font 'MesloLGM NF'
- save it (CTRL + S)

That's it, now you are a 10X developer :stuck_out_tongue_closed_eyes:



Enter fullscreen mode Exit fullscreen mode

Top comments (2)

Collapse
 
souleymanesy7 profile image
Souleymane Sy

I am getting an Error When I restart the Windows Powershell.
The $PROFILE is not Loading

Collapse
 
badgamerbad profile image
Vipul Dessai

looks like some misconfiguration that you did while setting up the $profile, check the content of it