Skip to content

Latest commit

 

History

History
63 lines (52 loc) · 2.18 KB

Pimp_WindowsTerminal.md

File metadata and controls

63 lines (52 loc) · 2.18 KB

How to pimp your Windows Terminal (Powershell + WSL2)

This is mainly a summary of scott hanselmans guide plus some googeling to make Oh my posh run on my machine.

nice shell

On Windows:

Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
Install-Module -Name PSReadLine -Scope CurrentUser -Force -SkipPublisherCheck
code $PROFILE
  • add the following lines at the end of your profile
Import-Module posh-git
Import-Module oh-my-posh
Set-PoshPrompt -Theme powerlevel10k_rainbow
  • preview available themes: Get-PoshThemes

In WSL

  • Install oh-my-posh:
sudo wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh
sudo chmod +x /usr/local/bin/oh-my-posh
  • Download Posh-Themes:
mkdir ~/.poshthemes
wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/themes.zip -O ~/.poshthemes/themes.zip
unzip ~/.poshthemes/themes.zip -d ~/.poshthemes
chmod u+rw ~/.poshthemes/*.json
rm ~/.poshthemes/themes.zip
  • Try it out with: eval "$(oh-my-posh --init --shell bash --config ~/.poshthemes/powerlevel10k_rainbow.omp.json)"
  • if it's working copy this to the end of your ~/.bashrc file.
    • in my case there was an issue with the initial prompt (it was kind of fragmented): eval clear at the end of my bashrc did the trick.

Download & Install Fonts on Windows

Set required Font in all Shells

https://stackoverflow.com/questions/66042480/not-getting-cascadia-code-pl-in-powershell

In Terminal - settings.json

 "profiles":
    {
        "defaults":
        {
            // Put settings here that you want to apply to all profiles.
            "fontFace": "MesloLGM NF"  //"Cascadia Code PL"
        },
   ....