Skip to content

Instantly share code, notes, and snippets.

@patevs
Forked from markwragg/terminal-icons-windows.md
Created October 30, 2019 03:19
Show Gist options
  • Save patevs/fe1fd9cb2e2e543ffa62a2eac82b532f to your computer and use it in GitHub Desktop.
Save patevs/fe1fd9cb2e2e543ffa62a2eac82b532f 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

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