This is the PowerShell profile I use - my theme is now built into oh-my-posh as "craver". Overall, to get this:
You'll need only these instructions - all other files in this gist are for reference only:
- Optional (not needed in Windows 11):
- Install Windows Terminal from the Microsoft Store...but this works in any Powershell terminal.
- The PowerShell modules:
Install-Module -Name posh-git,oh-my-posh,Terminal-Icons -Repository PSGallery
posh-git
is for git in PowerShell by @dahlbyk: https://github.com/dahlbyk/posh-gitoh-my-posh
is the core, for prompt customization by @jandedobbeleer: https://ohmyposh.dev/- Note: my theme is a recent addition to the
oh-my-posh
module. To update to latest, useUpdate-Module oh-my-posh
(then you'll need to restart your terminal to load latest)
- Note: my theme is a recent addition to the
Terminal-Icons
is the the excellent package for file/folder icons by @devblackops: https://github.com/devblackops/Terminal-Icons
- Edit your
Microsoft.PowerShell_profile.ps1
file to these 3 modules and set the prompt (this executes when you start a PowerShell terminal). The path for this is$profile
in PowerShell, e.g. to edit with VS Code:code $profile
:Import-Module -Name posh-git,oh-my-posh,Terminal-Icons Set-PoshPrompt -Theme craver
- You'll also need a font capable of rendering the symbols, I use Delugia Nerd Font (download: https://github.com/adam7/delugia-code) - other options like Hack NF and others work well too.
- For the grey background, in the same area as step 2 choose "One Half Dark".
- If you want a little bit darker like I use, I attached the relevant portions of my
settings.json
for Windows Terminal you can copy/paste into yours (full file structure given for context).
- If you want a little bit darker like I use, I attached the relevant portions of my
I hope you enjoy!
In windows Delugia font doesn't work properly for me,
So I used Agave Nerd Font from @Bogatinov link https://www.nerdfonts.com/font-downloads
Now It's working so well.