Skip to content

Instantly share code, notes, and snippets.

@markwragg
Last active April 16, 2024 19:43
Show Gist options
  • Star 44 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save markwragg/6301bfcd56ce86c3de2bd7e2f09a8839 to your computer and use it in GitHub Desktop.
Save markwragg/6301bfcd56ce86c3de2bd7e2f09a8839 to your computer and use it in GitHub Desktop.

How to get @DevBlackOps Terminal-Icons module working in PowerShell on Windows

Note: since version 0.1.1 of the module this now works in Windows PowerShell or PowerShell Core.

  1. Download and install this version of Literation Mono Nerd Font which has been specifically fixed to be recognised as monospace on Windows:

https://github.com/haasosaurus/nerd-fonts/blob/regen-mono-font-fix/patched-fonts/LiberationMono/complete/Literation%20Mono%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf

(see this issue for more info: ryanoasis/nerd-fonts#269)

  1. 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'
  1. Open PowerShell, right click the title bar > properties > Font > select your new font from the list.

  2. Install and load Terminal-Icons:

Install-Module Terminal-Icons -Scope CurrentUser
Import-Module Terminal-Icons

Result:

image

@plaiddk
Copy link

plaiddk commented Nov 14, 2023

@plaiddk My solution (I use Mononoki) was to use the full file path Import-Module C:\Users\user_name\Documents\PowerShell\Modules\Terminal-Icons\0.11.0\Terminal-Icons.psm1 I use pwsh 7.3.9 without problem

Thanks - I already tried this. Nothing happens. Just blank screen (No icons)

Screenshot_2

Update: I found out that i had no icons due too I had the module PSColor installed. When i Uninstalled the module it worked. So Uninstall-Module PSColor

@CheetahChrome
Copy link

CheetahChrome commented Nov 30, 2023

What worked for me was uninstalling Terminal via

winget uninstall Microsoft.WindowsTerminal

then in a normie powershell window, because Terminal magically goes away, I installed it

winget install Microsoft.WindowsTerminal

then in Terminal Settings->Defaults->Appearance is set to my font of choice

CaskaydiaCove Nerd Font

and started a new shell and I could see the directory icons.


My guess is at onetime I had the Terminal Preview installed or I am running on the Dev ring of Windows Update and something got horked.

@Leonardo-Huck
Copy link

A single font that works for me on PowerShell, Windows Terminal and VSCode with all the icons, is: "Meslo LG M Regular Nerd Font Completely Mono Windows Compatible"

faceFont: "MesloLGM NF"

Muito obrigado! Funcionou perfeitamente

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment