- Open Terminal,
$PROFILE - Remove line,
Import-Module posh-git - Optional, uninstall the
posh-gitmodule,uninstall-module posh-git
Steps to install, Oh My Posh
winget search oh-my-poshwinget install JanDeDobbeleer.OhMyPosh- Relaunch terminal window as Administrator
oh-my-posh font install- See, Configure Font below. Or, continue.
- Select:
- "CascadiaMono" (recommended by XI)
- "Meslo"
- Validate shell,
oh-my-posh get shell- Should return,
pwsh
- Should return,
- Get the PowerShell config path,
$PROFILE - Initialize and set the theme in the next step, "Set Our Theme"
- Initialize OMP
code $PROFILEornotepad $PROFILE- Add the one of the following lines (1st recommended)
oh-my-posh init pwsh --config "C:\BuildTools\lib\omp-themes\xeno-minimal.omp.json" | Invoke-Expressionoh-my-posh init pwsh --config "C:\PATH-TO\lib\omp-themes\xeno-clean.omp.json" | Invoke-Expression
- Reinitialize
. $PROFILE
- Close the terminal
- Download font:
- Extract, "CaskaydiaMonoNerdFontMono-Regular.ttf"
- Right Click > (Show more options) > Install for All Users
- WARNING: Performing { Open the file > "Install" } may only install for one user.
- Open Windows Terminal
- Profiles > "PowerShell" (or, "Defaults")> Additional Settings > Appearance
- Font Face > "CaskaydiaMonoNerdFontMono-Regular.ttf
Open Windows Terminal settings.json via, Ctrl + Shift + ,
More info found here.
Recommended Fonts:
- CaskaydiaMono Nerd Font Mon
MesloLGM Nerd Font
"profiles":
{
"defaults":
{
"opacity": 86,
"useAcrylic": true,
"font":
{
"face": "CaskaydiaMono Nerd Font Mono"
}
},- Run the following command (changing the path)
oh-my-posh init pwsh --config "C:\PATH-TO\lib\omp-themes\xeno-clean.omp.json" | Invoke-Expression- Get list of themes,
Get-PoshThemes - Export current theme,
oh-my-posh config export --output ~\mytheme.omp.json - Change Theme for session,
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\kali.omp.json" | Invoke-Expression Get-PSReadLineOption
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\kali.omp.json" | Invoke-Expression
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\hul10.omp.json" | Invoke-Expression
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\agnoster.minimal.omp.json" | Invoke-Expression$BranchGoneStatusSymbol = [PoshGitTextSpan]::new([char]0x00D7, [ConsoleColor]::DarkCyan) # × Multiplication sign
$BranchIdenticalStatusSymbol = [PoshGitTextSpan]::new([char]0x2261, [ConsoleColor]::Cyan) # ≡ Three horizontal lines
$BranchAheadStatusSymbol = [PoshGitTextSpan]::new([char]0x2191, [ConsoleColor]::Green) # ↑ Up arrow
$BranchBehindStatusSymbol = [PoshGitTextSpan]::new([char]0x2193, [ConsoleColor]::Red) # ↓ Down arrow
$BranchBehindAndAheadStatusSymbol = [PoshGitTextSpan]::new([char]0x2195, [ConsoleColor]::Yellow) # ↕ Up & Down arrow