Refactor Oh My Posh customization
This commit is contained in:
parent
bb28dadc16
commit
8b4082e6e1
1 changed files with 8 additions and 3 deletions
|
@ -148,9 +148,14 @@ function Restore-PersonalApps([Context] $context) {
|
||||||
nvs link latest;
|
nvs link latest;
|
||||||
|
|
||||||
# Terminal
|
# Terminal
|
||||||
$profileRoots = @($PROFILE, (powershell -c '$PROFILE')) | ForEach-Object { Split-Path -Parent $_; };
|
@($PROFILE, (powershell -c '$PROFILE')) | ForEach-Object {
|
||||||
$profileRoots | ForEach-Object { Remove-Item "$_/profile.d/*Oh My Posh*.ps1"; };
|
Get-Item "$(Split-Path -Parent $_)/profile.d/*Oh My Posh*";
|
||||||
$context.AddPowerShellProfileStatement($false, "999_Oh My Posh", "oh-my-posh init pwsh --config ~/Nextcloud/.omp/manuel.omp.json | Invoke-Expression");
|
} | ForEach-Object {
|
||||||
|
Get-Content $_ | ForEach-Object {
|
||||||
|
$indicator = "oh-my-posh init";
|
||||||
|
$_ -replace $indicator,"$indicator --config ~/Nextcloud/.omp/manuel.omp.json";
|
||||||
|
} | Set-Content $_;
|
||||||
|
}
|
||||||
|
|
||||||
# Gaming
|
# Gaming
|
||||||
choco install -y goggalaxy;
|
choco install -y goggalaxy;
|
||||||
|
|
Loading…
Reference in a new issue