diff --git a/TowerPcSetup.ps1 b/TowerPcSetup.ps1 new file mode 100644 index 0000000..50775ae --- /dev/null +++ b/TowerPcSetup.ps1 @@ -0,0 +1,72 @@ +# oh my posh +if (Get-Module -ListAvailable -Name oh-my-posh) { + Write-Host "oh-my-posh exists" +} +else { + Install-Module oh-my-posh +} +if (Get-Module -ListAvailable -Name posh-git) { + Write-Host "posh-git exists" +} +else { + Install-Module posh-git + Invoke-WebRequest -Uri 'https://github.com/powerline/fonts/archive/master.zip' -OutFile .\powerlinefonts.zip + Expand-Archive .\powerlinefonts.zip + .\powerlinefonts\fonts-master\install.ps1 + Remove-Item .\powerlinefonts.zip + Remove-Item .\powerlinefonts -Recurse +} + +Import-Module oh-my-posh +Import-Module posh-git +Set-PoshPrompt -Theme pure + +if (!(Test-Path -Path $PROFILE )) { + New-Item -Type File -Path $PROFILE -Force +} +$content = Get-Content $PROFILE +if ($content -inotcontains "oh-my-posh") { + Add-Content $PROFILE "Import-Module oh-my-posh" +} +if ($content -inotcontains "post-git") { + Add-Content $PROFILE "Import-Module posh-git" +} +if ($content -inotcontains "set-theme") { + Add-Content $PROFILE "Set-PoshPrompt -Theme pure" +} + +# code dir +if (-not (Test-Path C:\Code)) { + New-Item C:\Code -ItemType Directory +} + +# chocolatey +Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) + +choco install ` + dotnet ` + nodejs-lts ` + python3 ` + golang ` + git.install ` + microsoft-windows-terminal ` + vscode ` + visualstudio2019community ` + notepadplusplus.install ` + linqpad ` + linqpad5 ` + beyondcompare ` + brave ` + filezilla ` + 7zip.install ` + googledrive ` + docker-desktop ` + windirstat ` + steam-client ` + vlc + +choco install resilio-sync-home --checksum D5B76BA9FAF198E000F96246CD0B093AD53B4ACCB3B3FE4125DE260D4577A01D + +# get setup +git config --global user.email "benramey@fastmail.com" +git config --global user.name "Ben Ramey" \ No newline at end of file