Note: since version 0.1.1 of the module this now works in Windows PowerShell or PowerShell Core.
- Download and install this version of Literation Mono Nerd Font which has been specifically fixed to be recognised as monospace on Windows:
(see this issue for more info: ryanoasis/nerd-fonts#269)
- Modify the registry to add this to the list of fonts for terminal apps (cmd, powershell etc.):
$key = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont'
Set-ItemProperty -Path $key -Name '000' -Value 'LiberationMono NF'
-
Open PowerShell, right click the title bar > properties > Font > select your new font from the list.
-
Install and load Terminal-Icons:
Install-Module Terminal-Icons -Scope CurrentUser
Import-Module Terminal-Icons
Result:
You can tweak arround the Theme profile you are currently using.
I was not able to figure out a more 'clean' way to do this, but while the Terminal-Icons worked for me, the prompt icons set by the Theme itself showed as some weird hieroglyphs... well, expect the ones conversed from decimal code into a char type. So I did the same to the icons I wanted in my prompt:
type $ThemeSettings in your Terminal to find out where your Theme is located at (mine is C:\$HOME\$USER\Documents\WindowsPowerShell\Modules\oh-my-posh\2.0.492\Themes\Material.psm1, since i set mine to Material)
go to either your CurrentThemeLocation or MyThemeLocation - if you set up an individual Theme - and open your Theme in a editor
find the decimal code or the html-entity of the Icon you want to use - for the latter just copy the numbers behind the characters. in my case it's 127833 for the rice ball icon. I used this website as my main source for the decimal codes: https://www.compart.com/en/unicode/U+1F359

use your icons as chars conversed from decimal code in your ThemeName.psm1 (mine: Material.psm1) by declaring your desired icons like this:
$DesiredIconName=([char]::ConvertFromUtf32(IconDecimalCode)), for 🍙 i.e: $RiceBall=([char]::ConvertFromUtf32(127833))
as you noticed it also works with zero width joiners (ZWJ) for the hacker cat! 🐱💻
you can now use your icon in desired places. In my Theme (Material) I used it like this $user = $RiceBall + ' ' + $sl.CurrentUser + " </>"
and replaced the 🏠 HomeSymbol with $sl.PromptSymbols.HomeSymbol = $HackerCat
Looks like this now