Add a script for installing Oh My Posh

This commit is contained in:
Manuel Thalmann 2024-08-07 23:22:04 +02:00
parent 7fed854044
commit 1be771628b
3 changed files with 50 additions and 0 deletions
scripts/Common/Software/Oh My Posh

View file

@ -0,0 +1,28 @@
param (
$Action,
[hashtable] $Arguments
)
. "$PSScriptRoot/../PowerShell/Profile.ps1";
. "$PSScriptRoot/../../Scripts/Software.ps1";
. "$PSScriptRoot/../../Types/InstallerAction.ps1";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {
param(
[scriptblock] $Installer
)
& $Installer -Action ([InstallerAction]::Configure);
} `
-Configurator {
Add-PowerShellProfileStatement `
-System `
-Category "oh-my-posh" `
-Script (
@(
"# Oh My Posh!",
(Get-ScriptInitializer "oh-my-posh init pwsh"),
(Get-ScriptInitializer "oh-my-posh completion powershell")
) -join [System.Environment]::NewLine)
};