|
try { |
|
$(winget -v) |
|
} |
|
catch { |
|
Write-Output @" |
|
Install winget first |
|
https://docs.microsoft.com/windows/package-manager/winget/#install-winget |
|
"@ |
|
#$(New-Object -ComObject Wscript.Shell).Popup("Install winget first") |
|
exit |
|
} |
|
|
|
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') # iwr -useb get.scoop.sh | iex |
|
|
|
scoop install aria2 7zip zstd |
|
scoop install busybox sudo file vim |
|
scoop install nvs # should I replace it with https://volta.sh/ ? |
|
scoop install adb scrcpy |
|
|
|
# scoop install nvs ↑↑ |
|
nvs add lts |
|
nvs use lts |
|
scoop install yarn # yarn need nodejs to be installed |
|
|
|
scoop bucket add extras |
|
scoop install ventoy notepad3 zoom |
|
scoop install powertoys sumatrapdf treesize-free wiztree picpick # zeal |
|
|
|
<# |
|
!WARNING |
|
_winget_ not provide any way to call app from PS1 and update process sometimes broke app state |
|
Should I move Zoom here?... |
|
#> |
|
( |
|
"Mozilla.FirefoxDeveloperEdition", # Personal |
|
"KeeWeb.KeeWeb", |
|
"Telegram.TelegramDesktop", |
|
"SearchDeflector.SearchDeflector", |
|
"Deezer.Deezer", |
|
|
|
|
|
"Git.Git", # Dev |
|
"GoLang.Go", |
|
"Anaconda.Miniconda3", |
|
"Microsoft.VisualStudioCode", |
|
"Microsoft.WindowsTerminal", # is it already installed on Win 11? |
|
"Meld.Meld", |
|
|
|
"AdGuard.AdGuard", # Tools |
|
"Joplin.Joplin", |
|
"Adobe.AdobeAcrobatReaderDC", |
|
"Microsoft.PowerShell", |
|
"Transmission.Transmission", #, "PicoTorrent.PicoTorrent" |
|
"eloston.ungoogled-chromium", |
|
"WhatsApp.WhatsApp", |
|
"Discord.Discord", |
|
|
|
"Nvidia.GeForceNow", # Entertainment |
|
"Valve.Steam", |
|
"None" |
|
) | ForEach-Object {winget install -e --id $_} |
|
|
|
# "Microsoft.VisualStudioCode" |
|
Write-Output y | conda update --all |
|
Write-Output y | conda install jupyter numpy pandas |
|
conda init powershell |
|
|
|
( # "Microsoft.VisualStudioCode" |
|
"ms-vscode.powershell", |
|
"firefox-devtools.vscode-firefox-debug", |
|
"shd101wyy.markdown-preview-enhanced", |
|
"ms-python.python", |
|
"gamunu.vscode-yarn", |
|
"golang.go" |
|
) | ForEach-Object { code --install-extension $_ } |
|
|
|
$_profile = @' |
|
nvs use lts |
|
Write-Output "'search' 'status' 'update' 'runjupyter'='rj' 'search'" |
|
|
|
function search { |
|
Write-Output "Winget:" |
|
winget search $args |
|
Write-Output "Scoop:" |
|
scoop search $args |
|
} |
|
function status { |
|
nvs outdated |
|
scoop status |
|
winget upgrade |
|
} |
|
function update { |
|
nvs outdated |
|
nvs upgrade |
|
scoop update |
|
scoop update * |
|
scoop cleanup * |
|
scoop cache rm * |
|
winget upgrade --all |
|
conda update --all |
|
} |
|
|
|
function runjupyter { |
|
if(!$args) { |
|
Push-Location \work\mini\jupyter |
|
} else { |
|
Push-Location $args[0] |
|
} |
|
$current_WindowTitle = $host.UI.RawUI.WindowTitle |
|
$host.UI.RawUI.WindowTitle = "Jupyter (running...)" |
|
try { # try-finally help go back to start directory even if Ctrl-C placed |
|
jupyter notebook |
|
} finally { |
|
$host.UI.RawUI.WindowTitle = $current_WindowTitle |
|
Pop-Location |
|
} |
|
} |
|
Set-Alias -Name rj -Value runjupyter |
|
|
|
function websearch { |
|
Start-Process ("https://www.google.com/search?q=" + $args) |
|
} |
|
'@ |
|
|
|
( |
|
$PROFILE, #default PowerShell 5 profile |
|
$(pwsh.exe -NoProfile -Command 'echo $PROFILE') # PowerShell 7 profile |
|
) | ForEach-Object { |
|
if (-not (Test-Path -Path $_ -PathType leaf)) { |
|
New-Item -Path $_ -ItemType "file" -Force |
|
} |
|
Write-Output $_profile >> $_ |
|
} |
|
|
|
sudo ` |
|
Set-ItemProperty Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation |
|
-Name RealTimeIsUniversal |
|
-Value 1 |
|
|
|
$(New-Object -ComObject Wscript.Shell).Popup(@" |
|
Reenable "Set time automaticly" option in Time & Language in Options (Win+i) |
|
"@) |
|
|
|
# linking (default) pwsh5 profile to pwsh7 # now only write same text just in case |
|
# keep here for possible future mindchanging |
|
# sudo New-Item -Name $(pwsh.exe -NoProfile -Command 'echo $PROFILE') -ItemType SymbolicLink -Value $PROFILE |
|
|
|
# $(New-Object -ComObject Wscript.Shell).Popup(@" |
|
Write-Output @" |
|
Installation succeded |
|
You can map 'Caps Lock' to Win+Space as language changer via PowerToys app |
|
For update run: ``update`` |
|
For jupyter run: ``runjupyter`` or ``rj`` |
|
Maybe I(you?) need to: move Win.Terminal to Win+1, set Powershell_7 by default, and font size to 10 |
|
"@ |
|
#"@) |