Last active
May 15, 2022 12:40
-
-
Save pushrbx/54ebcb684183d6163d8601b1df47a1e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# powershell profile for oh-my-posh if you install it with winget, otherwise you need to import the oh-my-posh module | |
Import-Module posh-git | |
$ohmyposhversion = $(oh-my-posh --version) | |
$ohmyposhthemepath = "~/.oh-my-posh/themes/agnoster/v$ohmyposhversion" | |
# download a theme if not yet downloaded | |
if ((test-path $ohmyposhthemepath) -ne $true) { | |
new-item -itemType Directory -force -path $ohmyposhthemepath | |
$dwlurl = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/v$ohmyposhversion/themes/agnoster.omp.json" | |
$themeFilePath = join-path -path $ohmyposhthemepath -childpath "agnoster.omp.json" | |
invoke-webrequest -uri $dwlurl -outfile $themeFilePath | |
} | |
oh-my-posh --init --shell pwsh --config "$ohmyposhthemepath/agnoster.omp.json" | Invoke-Expression | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment