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!
Thank you, loving it so far :)
I had some hurdles getting to setup
Tutorial
Install Windows Terminal from Microsoft Store (also works on Powershell)
Open Terminal in Administrator mode to execute the following commands
Download
andcraver.omp.json
Microsoft.PowerShell_profile.ps1
files.json
file is your prompt profile.ps1
file is setup the profile on initialization of TerminalSave the files in
~\Documents\WindowsPowerShell
to automatically execute on opening the TerminalDownload the Nerd Font of your choice, to render the symbols in the terminal
Open Terminal and change the Font in settings
Update#1 - theme is built-in
oh-my-posh
Craver theme is built-in as part of
oh-my-posh
module, so it's no longer necessary to download thecraver.omp.json
file to save it locally.You may, if you like tinkering with it 😄
oh-my-posh
module with-Force
flag to receive the latest updatesMicrosoft.PowerShell_profile.ps1
with the built-in theme, instead of the file pathcraver.omp.json
fileand then if you like to use some of the settings in
snippet-settings.json
snippet-settings.json
Note: You may experience weird symbols since the settings depend on Delugia Nerd Font and my machine couldn't render some of the symbols like dotNET logo, even after re-installing the font.