Skip to content

All settings for my Windows Terminal and oh-my-posh.

Notifications You must be signed in to change notification settings

smichelotti/my-terminal

Repository files navigation

my-terminal

This repo contains everything I used to set up my customized Windows Terminal with PowerShell Core.

Windows Terminal Setup

Oh My Posh Install

Install Oh My Posh (I prefer winget):

winget install JanDeDobbeleer.OhMyPosh

Install PowerShell modules

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

Custom Oh My Posh Theme

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

Windows Terminal settings.json file here.

Git Aliases

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

AutoHotKey

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

About

All settings for my Windows Terminal and oh-my-posh.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published