Windows Terminal – Add Pretty Prompt and Background Image

So over the last few days I have been tidying up my terminal installation for both VSCode and Windows Terminal itself.

If you don’t know what Windows Terminal is…….. go and download it from: Windows Terminal overview | Microsoft Docs

In this overview the Microsoft Doc’s site talks you through installing and configuring your Windows Terminal, and also the fantastic Scott Hanselman talks us through setting up a ‘Pretty Prompt’ using oh-my-post and some Powerline fonts: How to make a pretty prompt in Windows Terminal with Powerline, Nerd Fonts, Cascadia Code, WSL, and oh-my-posh – Scott Hanselman’s Blog

From here, a great virtual friend of mine Rishab Kumar (@rishabk7) posted how to change the background of your Windows Terminal Client here: How to add a logo or GIF to Windows Terminal App (rishabkumar.com)

So basically here are the settings I have used to customise my Windows Terminal Client to get it looking like this:

Once you have installed the terminal, follow the tasks that are set out inside Scotts blog article above:

Install:

Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
Install-Module -Name PSReadLine -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck

Run:

"notepad $PROFILE"

In the notepad file that opens, copy the following and save:

Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox

Get a Powerline font and install it into your Windows/Fonts folder, download the Cascadia Code PL font from here: https://github.com/microsoft/cascadia-code/

Now……. in your Windows Terminal, select ‘Settings’ and a json setting file will open up:

Look for the ‘default’ area and this is the code you need to modify to show your new Cascadia Code Powerline font as well as set your background image! Have a play with the size and location so it looks right for you!

 {
            // Put settings here that you want to apply to all profiles.
	    "fontFace": "Cascadia Code PL",
            "fontSize": 12,
            "backgroundImage":"https://jonnychipz.com/wp-content/uploads/2020/10/img_4620.jpg?w=300",
	    "backgroundImageAlignment" : "bottomRight",
	    "backgroundImageOpacity":1,
            "backgroundImageStretchMode": "none"
        },

And voila! You now have a pretty prompt for your Git repo’s as well as a neat Powerline font that can display glyphs!

Windows Terminal Powerline Setup | Microsoft Docs

Leave a comment