Skip to content

Latest commit

 

History

History
98 lines (77 loc) · 3.51 KB

File metadata and controls

98 lines (77 loc) · 3.51 KB

Oh-My-Posh Themes

Uninstall POSH-GIT

  1. Open Terminal, $PROFILE
  2. Remove line, Import-Module posh-git
  3. Optional, uninstall the posh-git module, uninstall-module posh-git

Install

Steps to install, Oh My Posh

  1. winget search oh-my-posh
  2. winget install JanDeDobbeleer.OhMyPosh
  3. Relaunch terminal window as Administrator
    1. oh-my-posh font install
    2. See, Configure Font below. Or, continue.
    3. Select:
      • "CascadiaMono" (recommended by XI)
      • "Meslo"
  4. Validate shell, oh-my-posh get shell
    1. Should return, pwsh
  5. Get the PowerShell config path, $PROFILE
  6. Initialize and set the theme in the next step, "Set Our Theme"
  7. Initialize OMP
    1. code $PROFILE or notepad $PROFILE
    2. Add the one of the following lines (1st recommended)
      • oh-my-posh init pwsh --config "C:\BuildTools\lib\omp-themes\xeno-minimal.omp.json" | Invoke-Expression
      • oh-my-posh init pwsh --config "C:\PATH-TO\lib\omp-themes\xeno-clean.omp.json" | Invoke-Expression
    3. Reinitialize . $PROFILE

Configure Font

  1. Close the terminal
  2. Download font:
  3. Extract, "CaskaydiaMonoNerdFontMono-Regular.ttf"
  4. Right Click > (Show more options) > Install for All Users
    • WARNING: Performing { Open the file > "Install" } may only install for one user.
  5. Open Windows Terminal
  6. Profiles > "PowerShell" (or, "Defaults")> Additional Settings > Appearance
  7. Font Face > "CaskaydiaMonoNerdFontMono-Regular.ttf

Open Windows Terminal settings.json via, Ctrl + Shift + ,

More info found here.

Recommended Fonts:

    "profiles":
    {
        "defaults":
        {
            "opacity": 86,
            "useAcrylic": true,
            "font":
            {
                "face": "CaskaydiaMono Nerd Font Mono"
            }
        },

Set Our Theme

  1. Run the following command (changing the path)
oh-my-posh init pwsh --config "C:\PATH-TO\lib\omp-themes\xeno-clean.omp.json" | Invoke-Expression

Commands

  • Get list of themes, Get-PoshThemes
  • Export current theme, oh-my-posh config export --output ~\mytheme.omp.json
  • Change Theme for session, oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\kali.omp.json" | Invoke-Expression
  • Get-PSReadLineOption

Other themes

oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\kali.omp.json" | Invoke-Expression
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\hul10.omp.json" | Invoke-Expression
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\agnoster.minimal.omp.json" | Invoke-Expression

POSH-Git Symbols

$BranchGoneStatusSymbol           = [PoshGitTextSpan]::new([char]0x00D7, [ConsoleColor]::DarkCyan) # × Multiplication sign
$BranchIdenticalStatusSymbol      = [PoshGitTextSpan]::new([char]0x2261, [ConsoleColor]::Cyan)     # ≡ Three horizontal lines
$BranchAheadStatusSymbol          = [PoshGitTextSpan]::new([char]0x2191, [ConsoleColor]::Green)    # ↑ Up arrow
$BranchBehindStatusSymbol         = [PoshGitTextSpan]::new([char]0x2193, [ConsoleColor]::Red)      # ↓ Down arrow
$BranchBehindAndAheadStatusSymbol = [PoshGitTextSpan]::new([char]0x2195, [ConsoleColor]::Yellow)   # ↕ Up & Down arrow