Thanks to visit codestin.com
Credit goes to github.com

Skip to content

abirtasrif/omp-windows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 

Repository files navigation

oh-my-posh windows

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

  1. Install the windows terminal from store
  2. Download the OhMyPosh 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 !

Extras

  • To add Open in Terminal option in windows context menu, create a file anywhere in your computer with a .reg extension (you may create a txt.file and rename the extension to reg).

  • Edit the file with notepad or any other text editor and paste and save below code, save and close.

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked]
"{9F156763-7844-4DC4-B2B1-901F640F5155}"=-
  • Now right click on that file and Run as administrator

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published