diff --git a/scripts/Windows/Config/Oh My Posh/Install.ps1 b/scripts/Windows/Config/Oh My Posh/Install.ps1 new file mode 100644 index 00000000..07783c64 --- /dev/null +++ b/scripts/Windows/Config/Oh My Posh/Install.ps1 @@ -0,0 +1,7 @@ +#!/bin/pwsh +param($context) +. "$PSScriptRoot/../../Scripts/Context.ps1"; + +[Context] $context = $context; +Write-Host "Configuring Oh My Posh!"; +$context.AddPowerShellProfileStatement("999_Oh My Posh", 'oh-my-posh init pwsh | Invoke-Expression;'); diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index b26758ac..5b78cf1c 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -63,6 +63,7 @@ function Invoke-WindowsInstallation([Context] $context) . "$softwarePath/Thunderbird/Install.ps1" $context; . "$softwarePath/posh-git/Install.ps1" $context; . "$softwarePath/Terminal-Icons/Install.ps1" $context; + . "$softwarePath/Oh My Posh/Install.ps1" $context; $context.Set("MachineWideSoftware", 1, "DWord"); } diff --git a/scripts/Windows/Software/Oh My Posh/Install.ps1 b/scripts/Windows/Software/Oh My Posh/Install.ps1 new file mode 100644 index 00000000..22db1d84 --- /dev/null +++ b/scripts/Windows/Software/Oh My Posh/Install.ps1 @@ -0,0 +1,7 @@ +#!/bin/pwsh +param($context); +. "$PSScriptRoot/../../Scripts/Context.ps1"; + +[Context] $context = $context; +winget install --accept-source-agreements --accept-package-agreements -s winget JanDeDobbeleer.OhMyPosh; +. "$PSScriptRoot/../../Config/Oh My Posh/Install.ps1" $context;