- Chocolatey:
choco install microsoft-windows-terminal
- Windows Store: https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701?activetab=pivot:overviewtab
TIP: Pin the Terminal to your Taskbar for quick and easy access
Great docs here: https://docs.microsoft.com/en-us/windows/terminal/
Use the drop-down menu, or the Ctrl-,
shortcut. Recommend VS Code or Notepad++ for editor.
Recommendation: MesloLGS NS, but other code-oriented fonts probably also work great. https://github.com/romkatv/powerlevel10k#manual-font-installation
-
Just download and open / install each ttf file.
-
Then set the "fontFace" property in each "profile" in the Settings
{
// Make changes here to the powershell.exe profile.
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
"fontFace": "MesloLGS NF",
"commandline": "powershell.exe",
"hidden": false,
},
- Save the Settings.
Some included color schemes are avaialble upon install: https://docs.microsoft.com/en-us/windows/terminal/customize-settings/color-schemes#included-color-schemes For those schemes, you don't need to add the JSON for the scheme described in Step 2 below.
Lots of examples with screenshots and color values shown here: https://iterm2colorschemes.com/
Find JSON for the color schemes here: https://github.com/mbadolato/iTerm2-Color-Schemes/tree/master/windowsterminal
To use a color scheme:
- Open
Settings
for Windows Terminal (Settings menu orCtrl-,
) - Add the JSON for any color schemes you might want to use in the
"schemes"
array.
"schemes": [
{
"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"
}
- Reference the name of the scheme as the
"colorScheme"
for the profile you want:
{
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
"commandline": "powershell.exe",
"fontFace": "MesloLGS NF",
"padding": "20, 8, 8, 8",
"fontSize": 11,
"hidden": false,
"colorScheme": "Cobalt2"
},
- Save the
Settings
file.
Install oh-my-posh in some way (one shown below but others under the link):
winget install JanDeDobbeleer.OhMyPosh -s winget
Then run this command from a PowerShell prompt:
Test-Path $profile
If it returns False
, do this:
New-Item -Type File -Force $profile
Then edit the profile
notepad $profile
ALSO: From an elevated (administrator) Terminal window:
Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy RemoteSigned
Install-Module posh-git -Scope CurrentUser
Install-Module Terminal-Icons -Scope CurrentUser
You will see the custom-dracula-posh
theme mentioned here -- options explained below.
##---------------------------------------
## Theming
##---------------------------------------
Import-Module -Name Terminal-Icons
oh-my-posh init pwsh --config ~/custom-dracula-posh.json | Invoke-Expression
## or more simply to use the default theme, omit the --config argument:
## oh-my-posh init pwsh | Invoke-Expression
New-Alias npp "C:\Program Files (x86)\Notepad++\Notepad++.exe"
To get a list of all available themes (and see example prompts!!) use the following command:
Get-PoshThemes
Pick whichever one you like and replace ~/custom-dracula-posh.json
above with something like "$env:POSH_THEMES_PATH/jandedobbeleer.omp.json"
and make sure the theme name is before the .omp.json
piece.
In case you're curious, my custom Dracula theme is based on the available Dracula theme but removes a couple of segments and includes Kubernetes context:
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#6272a4",
"foreground": "#ffffff",
"leading_diamond": "\ue0b6",
"trailing_diamond": "\ue0b0",
"style": "diamond",
"type": "os"
},
{
"background": "#bd93f9",
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"style": "powerline",
"properties": {
"style": "folder"
},
"type": "path"
},
{
"background": "#ffb86c",
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"properties": {
"branch_icon": "",
"fetch_stash_count": true,
"fetch_status": false,
"fetch_upstream_icon": true
},
"style": "powerline",
"template": " \u279c ({{ .UpstreamIcon }}{{ .HEAD }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }}) ",
"type": "git"
},
{
"background": "#ff79c6",
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"style": "powerline",
"type": "kubectl",
"properties": {
"prefix": " \uF1D1 "
}
}
],
"type": "prompt"
}
],
"final_space": true,
"version": 2
}
You can see the themes shown in images/screenshots here: https://ohmyposh.dev/docs/themes
See them in the Terminal with the Get-PoshThemes
command.
It seems that PowerShell Profile, as is, throws an error!? Any update on that?