From 22d1b7a1bcab5e1af58911f60c1cf298f7046b5e Mon Sep 17 00:00:00 2001 From: lksz Date: Fri, 19 Feb 2021 20:00:07 -0500 Subject: [PATCH] Updated Style and config for oh-my-posh v3 --- base/profile.d/Style.ps1 | 6 +++++- base/src/config.files.json | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/base/profile.d/Style.ps1 b/base/profile.d/Style.ps1 index 7b7f354..aedd15b 100644 --- a/base/profile.d/Style.ps1 +++ b/base/profile.d/Style.ps1 @@ -1,2 +1,6 @@ Get-Command Set-PSReadLineKeyHandler | ForEach-Object { Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete } -Get-Command Set-Theme -ErrorAction SilentlyContinue | ForEach-Object { Set-Theme Paradox } +if( Get-Command Set-PoshPrompt -ErrorAction SilentlyContinue ) { + $local:poshPrompt = Join-Path $HOME ".oh-my-posh.omp.json" + if( -not (Test-Path $poshPrompt) ) { $poshPrompt = "powerlevel10k_classic" } + Set-PoshPrompt -Theme $poshPrompt +} elseif( Get-Command Set-Theme -ErrorAction SilentlyContinue ) { Set-Theme Paradox } diff --git a/base/src/config.files.json b/base/src/config.files.json index dae60a6..0653ace 100644 --- a/base/src/config.files.json +++ b/base/src/config.files.json @@ -6,6 +6,7 @@ "#vi" ], "vi": "~/.virc", + "omp": "~/.oh-my-posh.omp.json", "zshrc": "~/.zshrc", "zsys": "/etc/zsys.conf", "shrc": "~/.shrc",