Author: RyanR407
Posted: October 11, 2024
This guide covers the steps to enhance your PowerShell experience using Windows Terminal, the MesloLGS NF font, and oh-my-posh. Follow along to customize your environment for a better development experience. There is a video at the end of the blog article, if you prefer to watch instead of read.
Here is what the updated PowerShell command line shows:
Begin by installing Windows Terminal from the Microsoft Store. Windows Terminal provides an enhanced interface for your shell environment.
To get the best PowerShell look, install MesloLGS NF fonts. These fonts are required for displaying the icons used by oh-my-posh themes.
Once the font is installed, configure it in PowerShell.
Next, customize your Windows Terminal by editing the settings.json file.
"colorScheme": "Cobalt2",
"font": {
"face": "MesloLGS NF"
},
To enhance the look of your terminal, add the "Cobalt2" color scheme to your settings.json file.
There are other schemes, feel free to use a different one than Cobalt2
, you simply change the colorScheme
.
After updating the settings.json, save and close the file.
Cobalt2 Color Scheme code for settings.json:
{
"name": "Cobalt2",
"black": "#000000",
"red": "#ff0000",
"green": "#38de21",
"yellow": "#ffe50a",
"blue": "#1460d2",
"purple": "#ff005d",
"cyan": "#00bbbb",
"white": "#bbbbbb",
"brightBlack": "#555555",
"brightRed": "#f40e17",
"brightGreen": "#3bd01d",
"brightYellow": "#edc809",
"brightBlue": "#5555ff",
"brightPurple": "#ff55ff",
"brightCyan": "#6ae3fa",
"brightWhite": "#ffffff",
"background": "#132738",
"foreground": "#ffffff",
"cursorColor": "#f0cc09",
"selectionBackground": "#18354f"
},
Finally, install and configure oh-my-posh to enhance your PowerShell terminal prompt.
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
to allow scripts to run.New-Item -Type File -Force $PROFILE
to create a profile.notepad $PROFILE
to open your profile settings file.
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\atomic.omp.json" | Invoke-Expression
to setup oh-my-posh with the atomic theme.
You can also use themes othen than "atomic", check out the complete list here.
Here are some useful resources based on the topics covered in this article: