Skip to content

Oh My Posh Notes

  • Install/Update:

    PS> Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://ohmyposh.dev/install.ps1'))
  • Install a Nerd Font:

    PS> oh-my-posh font install meslo
  • Windows Terminal settings (profiles:defaults:font:face = "MesloLGM NerdFont")

  • Copy .mytheme.omp.json to $env:UserProfile

  • Add this line to $env:UserProfile\Documents\PowerShell\profile.ps1:

    PS> oh-my-posh init pwsh --config "~/.mytheme.omp.json" | Invoke-Expression
  • Enable the reload feature to immediately see changes made to ~/.mytheme.omp.json:

    PS> oh-my-posh enable reload
  • Make sure these tools are installed - curl, unzip, realpath, dirname:

    sudo apt install curl
    sudo dnf install curl
  • Install the latest version for your system:

    curl -s https://ohmyposh.dev/install.sh | bash -s
  • If it warns that ~/.local/bin is not in the PATH, add this to .bashrc:

    export PATH=$PATH:/home/<username>/.local/bin
  • Install Nerd Fonts:

    oh-my-posh font install meslo
  • Configure the terminal to use MesloLGM Nerd Font:

    • Gnome:
      • Right-Click Terminal in Dash → Preferences → “Unnamed” Profile → Text → check “Custom font” → select “MesloLGM Nerd Font”
    • KDE (Konsole):
      • Ctrl-Shift-, → Profiles → New… → General → “Oh My Posh Profile” → check “Default profile” → Apply → Appearance → Font Choose → “MesloLGM Nerd Font” → OK → OK → restart Konsole
  • Add this to ~/.bashrc:

    eval "$(oh-my-posh init bash --config '~/.mytheme.omp.json')"
  • (optional) Enable live reloading:

    oh-my-posh enable reload