How to Install Powerline on Windows 10

How to Install Powerline on Windows 10

February 1, 2021 1 By Nam Vu

Install a Powerline font

Powerline uses glyphs in order to style the prompt. If your font does not include Powerline glyphs, you may see several Unicode replacement characters ‘▯’ throughout your prompt. Though Cascadia Mono does not include Powerline glyphs, you can install Cascadia Code PL or Cascadia Mono PL, which have the Powerline glyphs included. These fonts can be installed from the Cascadia Code GitHub releases page.

PowerShell prerequisites

If you don’t already have it, install Git for Windows.
Using PowerShell, install Posh-Git and Oh-My-Posh:

Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser

You may need to install NuGet if you don’t already have it. Your PowerShell command line will ask if you want to install NuGet if this is the case. Select [Y] Yes. You may also need to approve that you are installing modules from PSGallery, an ‘untrusted repository’. Select [Y] Yes.

Posh-Git adds Git status information to your prompt as well as tab-completion for Git commands, parameters, remotes, and branch names. Oh-My-Posh provides theme capabilities for your PowerShell prompt.

If you are using PowerShell Core, install PSReadline:

Install-Module -Name PSReadLine -Scope CurrentUser -Force -SkipPublisherCheck

PSReadline lets you customize the command line editing environment in PowerShell.

Customize your PowerShell prompt

Open your PowerShell profile with notepad $PROFILE or the text editor of your choice. This is not your Windows Terminal profile. Your PowerShell profile is a script that runs every time PowerShell starts. Learn more about PowerShell profiles.

In your PowerShell profile, add the following to the end of the file:

Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox

Now, each new instance starts by importing Posh-Git and Oh-My-Posh, then setting the Paradox theme from Oh-My-Posh. Oh-My-Posh comes with several built-in themes.
https://github.com/JanDeDobbeleer/oh-my-posh#themes

Install dependencies:

Install-Module PANSIES -AllowClobber

Install powerline in Powershell:

Install-Module PowerLine

Install powerline in Cmder:

sudo apt-get install fonts-powerline

https://github.com/AmrEldib/cmder-powerline-prompt