Add function to set my locale prefs

This commit is contained in:
Anthony Rose 2024-06-05 10:21:07 +01:00
parent 9b47b43325
commit b65d4787b1

View file

@ -63,6 +63,20 @@ function mkcd {
Set-Location -Path $Path Set-Location -Path $Path
} }
function Set-AcpLocale {
# Set the default en-GB locale.
Set-WinUserLanguageList -LanguageList en-GB -Force
# Get the default locale back.
$AcpLocale = Get-WinUserLanguageList
# Remove the British layout and add the US layout.
$AcpLocale[0].InputMethodTips.Remove("0809:00000809")
$AcpLocale[0].InputMethodTips.Add("0809:00000409")
# Set the locale to our customised version.
Set-WinUserLanguageList -LanguageList $AcpLocale -Force
# Clean up.
Remove-Variable AcpLocale
}
if ($IsWindows -or ($env:OS -eq "Windows_NT")) { if ($IsWindows -or ($env:OS -eq "Windows_NT")) {
function who { function who {
& "$env:SystemRoot\System32\query.exe" user & "$env:SystemRoot\System32\query.exe" user