# Windows Terminal Settings ## Add git color hint and powershell theme. ### 1. Install fonts https://github.com/ryanoasis/nerd-fonts Font: FiraCode ### 2. Insatall Necessary Library. ```cmd= // use powershell with Administrator Install-Module -Name Terminal-Icons -Repository PSGallery -Force Install-Module posh-git -Scope CurrentUser -Force winget install JanDeDobbeleer.OhMyPosh -s winget ``` ### 3. Add **"Microsoft.PowerShell_profile.ps1"** file ```cmd= // use powershell with Administrator echo $profile //show file path (but may file not exists) notepad $profile //edit file (if file not exists, it will create file) ``` ![](https://i.imgur.com/ieU0r8G.png) ### 4. Update powershell default setting at **"Microsoft.PowerShell_profile.ps1"** file This settings will effect when powershell startup. ```cmd= Import-Module posh-git Import-Module -Name Terminal-Icons oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/gmay.omp.json" | Invoke-Expression Set-Alias k kubectl Set-Alias d docker Set-Alias dc docker-compose ``` ### 5. Set powershell scripts execution policy to **"Unrestricted"** ```cmd= // use powershell Set-ExecutionPolicy Unrestricted ``` ### 6. Set windows terminal use "FiraCode Nerd Font Retina" font. ![](https://i.imgur.com/MQnkQC8.png) ### 7. Install Clink After Installed, Use CMD to check install succeed. ```cmd= clink info ``` https://chrisant996.github.io/clink/ ### 8. Update Lua Scritps add lua file: **oh-my-posh.lua** ```cmd= load(io.popen('oh-my-posh --config="https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/gmay.omp.json" --init --shell cmd'):read("*a"))() ``` ![](https://i.imgur.com/SB0C3EC.png) ###### tags: `Development Tool`