Terminal emulator

Customize your terminal in PowerShell or WSL with Oh My Posh

ref: Microsoft

This tutorial provides some resources and direction to help you customize your command prompt for PowerShell or Windows Subsystem for Linux (WSL) using Oh My Posh. Oh My Posh provides theme capabilities for a fully customized command prompt experience providing Git status color-coding and prompts.

example

Getting started

  1. install Homebrew to recommended directory /home/linuxbrew/.linuxbrew
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
    Run these two commands in your terminal to add Homebrew to your PATH
    echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/chris/.profile
    eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
    
    We recommend that you install GCC
    brew install gcc
    
  2. Install Nerd fonts
    I chose RobotoMono Nerd Font, since it has dashed zero, curved and straight character lines.
  3. Follow the Linux install guide in the Oh My Posh docs
    brew tap jandedobbeleer/oh-my-posh
    brew install oh-my-posh
    
    Choose and apply a WSL prompt theme
    • The Oh My Posh themes will be found in the oh-my-posh directory as JSON files.
    • Go to cd $(brew --prefix oh-my-posh), then just cd themes and ls for the list.
    • Copy the theme agnoster to my user's $HOME folder
      cp agnoster.omp.json $HOME
      
      Add the following to ~/.profile
    eval "$(oh-my-posh --init --shell bash --config ~/agnoster.omp.json)"
    
    Once added, reload your profile for the changes to take effect.
    . ~/.profile
    

DONE

Alacritty terminal emulator

I followed this tutorial to configure the custom color schemes, forked from Obsidian Primary theme.