A lot of people asked me about my Windows terminal (Powershell) looks and theme and how to customize it. Here I will try to give you a detailed description of how you can customize your PowerShell but you can also use similar methods to your Zshell or any Linux shell. So let's get started.
Example of end results
First of all you need to install Windows Terminal. You can download it from here or search it in Microsoft Store. It's built-in in Windows 11. After you install it you can open it and you will see something like this:
Windows Terminal
Now you need to get PowerShell. You can download it from here or search it in Microsoft Store. Now you will be able yo select it in Windows Terminal. You can do it by clicking on the down arrow in the top bar and selecting PowerShell**. If you don't see it in the menu, just restart it. Now you will see something like this:
Windows Terminal dropdown menu with PowerShell
Now go to your terminal settings and set PowerShell as your default shell. Also set Windows Terminal as your default terminal. You can do it by clicking on the down arrow in the top bar and select Settings. Now you will see something like this:
Now you need to install a font that will support all the icons and characters that we will use. I use Cascadia Cove Nerd Font Complete. You can download it from here. Download it and install it. After installing restart your Terminal app and select CascadiaCove NF as your default font. You can do it by clicking on the down arrow in the top bar and select Settings. Now you will see something like this:
Now you need to install Oh My Posh. You can do it by running this command in your terminal:
winget install JanDeDobbeleer.OhMyPosh
Read the Oh My Posh documentation here.
After this restart the Terminal app and edit $profile file. You can open $profile by running this command in your terminal:
notepad $PROFILE
if you want to edit in VS Code run this command:
code $PROFILE
Edit the $profile file and add this line:
oh-my-posh --init --shell pwsh --config ~/jandedobbeleer.omp.json | Invoke-Expression
If you want you can use my profile file and just replace it with yours. You can download it from this repo. Your $profile file will be different. change the path and adjust your settings. You can find more information about $profile file here. After changing $profile file restart your Terminal app. Now you will see something like this:
Now you need to install Oh My Posh Themes. You can do it from here. I added the theme I use in this repo and you can download it from here. You can also create your own theme. You can find more information about themes here. After you download the theme you want you need to import it.
Now you need to install Terminal Icons. You can do it by running this command in your terminal:
Install-Module -Name Terminal-Icons -Repository PSGallery
Read the Terminal Icons documentation here Add this line in your $profile file:
Import-Module -Name Terminal-Icons
After this restart the Terminal app. Now you will see something like this (your theme will look different):
PsReadLine is my favourite. It will suggest your commands and autocomplete them depending on your previous commands. You can do it by running this command in your terminal:
Install-Module -Name PSReadLine -Repository PSGallery -Force
Read the PsReadLine documentation here. Add this line in your $profile file:
Import-Module -Name PSReadLine
I will suggest you to go and read a blog by Scott Hanselman about PsReadLine. He is one of my favorite internet people. He is a great developer and you can learn a lot from his videos. You can find his videos on YouTube.
Windows Terminal is very customizable. You can change the background, the font, the opacity, the color scheme, and a lot more. You can find more information about Windows Terminal customization here. You can also find a lot of themes here. You can also create your own theme. You can find more information about themes here. I included my settings.json file in this repo. You can check it for reference.
This doc is still in progress. Everything till now covers the basics of Windows terminal customization. I will soon add more details...