From 4444ec5b5b62d85d6ead88528b165ddadd328f7c Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Thu, 3 Jun 2021 21:08:16 +0800 Subject: [PATCH] [bugfix] adapt for windows 21H1 --- win/WindowsTerminal/settings.json | 7 +++---- win/profile.ps1 | 5 +++-- win/setup/oh-my-posh.ps1 | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/win/WindowsTerminal/settings.json b/win/WindowsTerminal/settings.json index 44187aa..5dec5c8 100644 --- a/win/WindowsTerminal/settings.json +++ b/win/WindowsTerminal/settings.json @@ -33,10 +33,9 @@ "acrylicOpacity": 0.6, "colorScheme": "One Half Dark", "cursorShape": "filledBox", - // install the non-window-compatible version - // "fontFace": "agave Nerd Font r", - "fontFace": "Sarasa Mono SC", - "fontSize": 12 + // https://github.com/laishulu/Sarasa-Mono-SC-Nerd/releases/latest + "fontFace": "Sarasa Mono SC Nerd", + "fontSize": 10 }, "list": [ { diff --git a/win/profile.ps1 b/win/profile.ps1 index 20dabbb..c10d9da 100644 --- a/win/profile.ps1 +++ b/win/profile.ps1 @@ -2,6 +2,7 @@ # Set-ExecutionPolicy RemoteSigned # new-item -ItemType SymbolicLink -Target "D:\Nextcloud\klesh\config\win\profile.ps1" -Path $profile +$env:POSH_GIT_ENABLED = $true Set-PSReadLineOption -EditMode Emacs Set-PSReadLineOption -PredictionSource History @@ -23,9 +24,9 @@ Set-Alias -Name v nvim $isPs7 = $host.Version.Major -ge 7 if ( $isPs7 ) { if ((Get-Module oh-my-posh).Version.Major -eq 3) { - Set-PoshPrompt -Theme fish + Set-PoshPrompt -Theme emodipt } else { - Set-Prompt -Theme fish + Set-Prompt -Theme emodipt } } diff --git a/win/setup/oh-my-posh.ps1 b/win/setup/oh-my-posh.ps1 index 3636424..a76e6d2 100644 --- a/win/setup/oh-my-posh.ps1 +++ b/win/setup/oh-my-posh.ps1 @@ -1,8 +1,9 @@ # curl: https://curl.se/windows/ # ag: https://github.com/k-takata/the_silver_searcher-win32/releases # fzf: https://github.com/junegunn/fzf/releases/latest -# $PSDefaultParameterValues = @{ "*:Proxy"="http://localhost:8123" } +$PSDefaultParameterValues = @{ "*:Proxy"="http://localhost:8123" } #Install-Module -Name PowerShellGet -Force -AllowPrerelease +Register-PSRepository -Default -InstallationPolicy Trusted Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted Install-Module -Name posh-git Install-Module -Name oh-my-posh