This repo contains everything I used to set up my customized Windows Terminal with PowerShell Core.
Install Oh My Posh (I prefer winget):
winget install JanDeDobbeleer.OhMyPosh
These are the PowerShell modules I use that the $profile is dependent on.
Install-Module -Name Terminal-Icons -Repository PSGallery
Install-Module PSReadLine -AllowPrerelease -Force
Install-Module -Name MagicTooltips -Repository PSGallery
The custom posh theme (paradox-michelotti.omp.json) is specified in the PowerShell $profile file (Microsoft.PowerShell_profile).
Copy Microsoft.PowerShell_profile.ps1 from here to the $profile location:
cp .\Microsoft.PowerShell_profile.ps1 $profile
Copy paradox-michelotti.omp.json to a shared location (this much match location in $profile):
cp .\paradox-michelotti.omp.json ~/Dropbox/utils/terminal/paradox-michelotti.omp.json
This must match location in $profile file:
oh-my-posh --init --shell pwsh --config ~/Dropbox/utils/terminal/paradox-michelotti.omp.json | Invoke-Expression
Windows Terminal settings.json file here.
git config --global alias.l "log --graph --decorate --pretty=oneline --abbrev-commit"
git config --global alias.new "!git init && git symbolic-ref HEAD refs/heads/main"
git config --global alias.co checkout
git config --global alias.br branch
The following snippet uses AutoHotKey to focus the terminal on-demand using Alt+Z (yes, I know Quake mode exists, but I prefer default behavior).
;***********************************************************
; *** Alt+Z to start (or re-focus) Windows Terminal ***
!z::
if WinExist("ahk_exe WindowsTerminal.exe")
{
WinActivate
}
return
- Save this AutoHotKey snippet to a file (e.g., ahk-global.ahk) - then create a Windows shortcut for that file
- Win+R ->
shell:startup
- move the shortcut file to this directory so it will run on Windows startup