abirtasrif / omp-windows

Guide to setup oh-my-posh with powerline in windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

oh-my-posh windows

Guide to setup oh-my-posh with powerline in windows

  1. Install the windows terminal from store
  2. Download the powershell by running below command in Windows Terminal (Make sure Terminal is using Windows Powershell) winget install JanDeDobbeleer.OhMyPosh -s winget if failed to initiate, go to windows store and install app installer. Below picture for reference-

Image of app installer

  1. Download the DaddyTimeMono NF font or any other Nerd font
  2. Make the downloaded font in settings of terminal. Pressing Ctrl+Shift+, will open the settings.json file. add below lines into "defaults":{} array
"font": {
        "face": "DaddyTimeMono NF"
      }

it should be look like this-

...
"profiles": {
    "defaults": {
      "font": {
        "face": "DaddyTimeMono NF"
      }
    },
    "list": [
      {
        "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
        ....
  1. Restart terminal with Admin privilege
  2. Edit the profile settings with notepad by running notepad $PROFILE
  3. If above command returns below error, that means profile setting file is not present. To make one, run - New-Item -Path $PROFILE -Type File -Force

image

  1. Now edit the profile by notepad $PROFILE and save the file after putting oh-my-posh init pwsh | Invoke-Expression in the profile.
  2. Run oh-my-posh init pwsh | Invoke-Expression , the shell should be start working immediately.
  3. If this returns error saying running script is disabled in this system, run Set-ExecutionPolicy RemoteSigned
  4. Load the new profile with command . $PROFILE
  5. Restart the terminal and enjoy !

About

Guide to setup oh-my-posh with powerline in windows