Skip to content

payini/PimpMyTerminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Table of Contents

Introduction

In this demo, I am going to show you how to pimp your terminal, whether you are a PC or Mac developer.

Are you a Windows PC developer and you are not using Windows Terminal, or you have not even heard of it? This demo is for you!

Are you a Mac Developer, and you are using the default zsh terminal? this demo is for you!

By "pimp your terminal" I mean making your terminal look on Windows PC from this:

Command Prompt Terminal

To this:

Pimped Command Prompt Terminal

Or on macOS from this:

macOS Terminal

To this:

Pimped macOS Terminal

Not only the command prompt will be "Pimped" but also the results on a PC:

From this:

Command Prompt Terminal

To this:

Pimped Command Prompt Terminal

So, how do we do it? Let's get started!

Prerequisites

Windows Prerequisites

In order to "Pimp your Terminal" on a Windows PC, you will need to forget about our dear "Command Prompt" and download the newest Windows Terminal from the Windows Store. Alternatively, you can download it directly from GitHub.com, from this link, as Windows Terminal is open source.

You also need to download and install PowerShell Core from this link.

📘 The recommended way to install Windows Terminal is from the Windows Store, so you get automatic updates.

macOS Prerequisites

Windows Terminal is not a cross-platform application, and is not possible to pimp your default zsh macOS Terminal, so in order to pimp our terminal in macOS, we need to install iTerm2 from this link, which is free.

Demo

The very first time I ever heard from someone talking about taking your terminal to the next level, a few years ago, was from the "third" Microsoft Scott, Scott Hanselman. I recommend you follow his blog here. The "first" being "Scott Guthrie", the creator of ASP.NET Web Forms and blogging here, and the "second" Scott Hunter, Director Program Management, .NET, which you can also follow his blog here.

In order to "Pimp your Terminal" we are going to use a tool called "Oh My Posh", which works on any shell like PowerShell on Windows, or Bash shells on WSL (Windows Subsystem for Linux) running Ubuntu.

💡 You can find the official Oh My Posh! documentation here.

Oh My Posh Installation on Windows

In order to install Oh My Posh on Windows you will need winget.

Install on Windows

winget install oh-my-posh

Update on Windows

winget upgrade oh-my-posh

Themes

POSH_THEMES_PATH

Setup on Windows

oh-my-posh --init --shell pwsh --config $env:POSH_THEMES_PATH/montys.omp.json | Invoke-Expression

Import-Module -Name Terminal-Icons
#Themes: jandedobbeleer, sonicboom_light, paradox, montys, mojada, gmay, cloud-native-azure, agnosterplus

Oh My Posh Installation on macOS

In order to install Oh My Posh on Windows you will need brew.

Install on macOS

brew install jandedobbeleer/oh-my-posh/oh-my-posh

Update on macOS

brew update && brew upgrade oh-my-posh

Setup Theme on macOS

# Enable theme
if [ $TERM_PROGRAM != "Apple_Terminal" ]; then
   # Themes directory: $(brew --prefix oh-my-posh)/themes
   # Change theme: montys.omp.json
   eval "$(oh-my-posh init zsh --config /usr/local/opt/oh-my-posh/themes/atomic.omp.json)"
fi

Oh My Posh Installation on Linux

Install on Linux

brew install jandedobbeleer/oh-my-posh/oh-my-posh

Update on Linux

brew update && brew upgrade oh-my-posh

Summary

As you can see, pimping your terminal and make it look awesome, is a very simple process thanks to "Oh My Posh", and it works on Windows, macOS and Linux. Give it a try!

For more information, take a look at the resources below.

Complete Instructions

The complete instructions for this demo can be found in the link below.

Resources

Resource Title Url
Install and get started setting up Windows Terminal https://docs.microsoft.com/en-us/windows/terminal/install
iTerm2 https://iterm2.com
Oh My Posh https://ohmyposh.dev/
Nerd Fonts https://www.nerdfonts.com/
Scott Guthrie's Blog https://azure.microsoft.com/en-us/blog/author/scott-guthrie/
Scott Hunter's Blog https://devblogs.microsoft.com/dotnet/author/scott-h
Scott Hanselman's Blog https://www.hanselman.com/blog
My Ultimate PowerShell prompt with Oh My Posh and the Windows Terminal https://www.hanselman.com/blog/my-ultimate-powershell-prompt-with-oh-my-posh-and-the-windows-terminal

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published