DEV Community

Vipul Dessai
Vipul Dessai

Posted on

24 2

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

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

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

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay