Terminal is the tools for developer and operator and it streamline many routine process in batch. And we are face it almost everyday.
There are several tools which can help to customize it to make it coo.
Perquisites
- Windows Terminal should be install.
It can install in Windows Store.
Steps
- Install Nerd Fonts.
Nerd Fonts is a set of fonts and icon-sets enables developer make IDE font more readable and more icons available to use by front-end developers.
Remind that, it needs to install fonts to use it instead of reference it in path.
- Install Power shell modules.
Execute commands below in PowerShell to install module oh-my-posh and posh-git.
oh-my-posh is a prompt engine to customize prompt string with functions and variable. posh-git is one of the plug-in.Install-Module -Name oh-my-posh Install-Module -Name posh-git Install-Module -Name terminal-icons Set-PoshPrompt jandedobbeleer
- Select Windows Terminal color tone.
Go to Windows Terminal Theme, select color tone you like and click Get Theme, related color scheme will copy to clipboard. - Open Windows Terminal settings.
Open Windows Terminal, select icon and click settings.
- Alter color scheme in settings.json.
In scheme tag, paste color scheme JSON which copy before.
- Apply Nerd fonts and color scheme settings.
In default tag, add properties as below."fontFace": "FiraCode NF", "colorScheme": "Afterglow"
- Open PowerShell load profile.
Execute command below.notepad $profile
- Apply pre-execute command
Input command as below.Import-Module oh-my-posh Import-Module posh-git Import-Module terminal-icons Set-PoshPrompt jandedobbeleer
- Test.
Reopen Windows Terminal, expected color tone and prompt string updated.
Reference
- Nerd Fonts
https://www.nerdfonts.com/ - Oh my posh
https://ohmyposh.dev/ - posh-git, GitHub,
https://github.com/dahlbyk/posh-git - Windows Terminal Theme
https://windowsterminalthemes.dev/
Leave a Reply