Last active
August 26, 2024 23:19
-
-
Save Mellbourn/fa08dd4262201950a395 to your computer and use it in GitHub Desktop.
Boxstarter script for Windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
#windows 8 | |
#Set-StartScreenOptions -EnableBootToDesktop -EnableDesktopBackgroundOnStart | |
#upgrade PowerShell | |
iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI" | |
#Enable-MicrosoftUpdate | |
Enable-RemoteDesktop | |
#Install-WindowsUpdate -Full -acceptEula | |
Update-ExecutionPolicy RemoteSigned | |
#these are needed for WSL 2 https://success.docker.com/article/manually-enable-docker-for-windows-prerequisites | |
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All | |
#Enable-WindowsOptionalFeature -Online -FeatureName Containers -All | |
choco upgrade all -y | |
choco install -y chocolatey | |
#choco install -y netfx-4.5.2-devpack | |
#choco install -y dotnetcore-sdk | |
#dotnet tool install --global PowerShell | |
#dotnet tool update --global PowerShell | |
choco install -y powershell-core | |
choco install -y git | |
#choco install y meld | |
choco install -y kdiff3 | |
[Environment]::SetEnvironmentVariable("LANG", "en", "User") | |
choco install -y gitextensions | |
#choco install -y TortoiseGit | |
#choco install -y sourcetree | |
choco install -y nodejs | |
choco install -y yarn | |
choco install -y 7zip | |
choco install -y authy-desktop | |
#choco install Atom | |
# VSCode now has a user installation, that should be used instead | |
#choco install -y VisualStudioCode | |
#choco install -y webstorm | |
#[Environment]::SetEnvironmentVariable("EDITOR", ((Join-Path $env:LOCALAPPDATA Code\bin\code.cmd) -replace "\\","/"), "User") | |
#choco install -y cmder | |
choco install -y poshgit | |
choco install -y sysinternals | |
choco install -y windirstat | |
# fiddler4 no longer exists? | |
#choco install -y fiddler4 | |
#choco install -y python | |
# Personal stuff | |
#choco install -y google-backup-and-sync | |
#maybe googldrive works? | |
#choco install -y googledrive | |
#choco install -y dropbox | |
choco install -y notepad2 | |
choco install -y nugetpackageexplorer | |
choco install -y nuget.commandline | |
#choco install -y skype | |
choco install -y vlc | |
choco install -y vnc-viewer | |
choco install -y keepass | |
choco install -y keepass-plugin-keetheme | |
choco install -y bitwarden | |
#choco install -y battle.net | |
#choco install -y fitbit.connect | |
# use portable install on Google Drive instead | |
#choco install -y ditto | |
# use copyq instead! is cross platform, no use built in instead | |
#choco install -y copyq | |
#choco install VisualStudio2013Professional -InstallArguments "/Features:'SQL WebTools'" | |
#choco install vs2013.4 | |
#choco install -y visualstudio2015enterprise | |
##interesting options | |
choco install -y plex | |
#choco install -y skype | |
#choco install -y battle.net | |
choco install -y zoom | |
#choco install -y anaconda3 | |
#choco install -y anaconda2 | |
#[Environment]::SetEnvironmentVariable("PYTHON", "C:\tools\Anaconda3\python.exe", "User") | |
#[Environment]::SetEnvironmentVariable("PYTHON", "C:\tools\Anaconda2\python.exe", "User") | |
# use this to get updated console colors (which comes with new Windows 10 but not upgraded ones) | |
# https://blogs.msdn.microsoft.com/commandline/2017/08/11/introducing-the-windows-console-colortool/ | |
choco install -y colortool | |
pushd C:\ProgramData\chocolatey\lib\colortool\content\schemes | |
colortool -d campbell | |
popd | |
# cascadia fonts installs four variants: mono and pl. PL is nice. mono is the default, so should be installed | |
choco install -y cascadiafonts | |
# Delugia is not on Chocolatey, so I guess this will have to do. it is actually Caskaydia | |
choco install -y cascadia-code-nerd-font | |
choco install -y jetbrainsmono | |
choco install -y firacode | |
choco install -y microsoft-windows-terminal | |
choco install -y jbs | |
# f.lux functionality is now built in to Windows 10. Also, it makes HDR displays orange | |
#choco install -y f.lux | |
## pia requires interaction£ | |
#choco install -y pia | |
# hardware specific | |
# installed on klomplett | |
#choco install -y --version=6.72.344 logitech-options | |
#npm install -g gulp bower yo generator-gulp-angular | |
# install scoop | |
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') | |
scoop install croc | |
# associate textfiles with code | |
cmd /c ftype txtfile=`"C:\Users\Klas\AppData\Local\Programs\Microsoft VS Code\Code.exe`" `"%1`" | |
yarn global add flow-bin eslint | |
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux | |
function Set-Shortcut { | |
param ( [string]$SourceExe, [string]$ArgumentsToSourceExe, [string]$DestinationPath ) | |
$WshShell = New-Object -comObject WScript.Shell | |
$Shortcut = $WshShell.CreateShortcut($DestinationPath) | |
$Shortcut.TargetPath = $SourceExe | |
$Shortcut.Arguments = $ArgumentsToSourceExe | |
$Shortcut.Save() | |
} | |
Set-Shortcut "C:\Windows\System32\wsl.exe" "tmux attach -t base || tmux new -s base" ($env:USERPROFILE + "\Desktop\tmux.lnk") | |
Copy-Item -Force "$env:USERPROFILE/Desktop/tmux.lnk" "$env:APPDATA/Microsoft/Windows/Start Menu/Programs/Startup" | |
# Copy-Item -Force "$env:PUBLIC/Desktop/Visual Studio Code.lnk" "$env:APPDATA/Microsoft/Windows/Start Menu/Programs/Startup" | |
git config --global mergetool.keepbackup false | |
#git config --global alias.lol "log --graph --decorate --oneline --all" | |
#git config --global alias.lo "log --graph --decorate --oneline" | |
git config --global alias.ci commit | |
git config --global alias.br branch | |
git config --global alias.co checkout | |
git config --global alias.st status | |
git config --global alias.mt mergetool | |
git config --global alias.dt difftool | |
git config --global alias.unstage "reset HEAD --" | |
git config --global alias.last "log -1 HEAD" | |
git config --global fetch.prune true | |
git config --global log.decorate short | |
git config --global log.abbrevcommit true | |
git config --global log.date relative | |
#git config --global credential.helper wincred | |
git config --global credential.helper '!\"C:\Program Files (x86)\GitExtensions\GitCredentialWinStore\git-credential-winstore.exe\"' | |
git config --global push.default simple | |
# Personal settings | |
git config --global rerere.enabled true | |
git config --global pull.rebase true | |
git config --global rebase.autoStash true | |
# hmm, the default global on windows is true | |
git config --global core.autocrlf false | |
git config --global core.editor "code --wait" | |
git config --global core.fscache true | |
git config --global alias.lol "log --graph --all" | |
git config --global alias.lo "log --graph" | |
git config --global format.pretty "%C(yellow)%h %C(magenta)%<(15,trunc)%an %C(cyan)%<(12,trunc)%cd %C(auto)%d%Creset %s" | |
git config --global user.name "Klas Mellbourn" | |
git config --global user.email "[email protected]" | |
git config --global core.longpaths true | |
# to stop: unable to start ssh-agent service, error :1058 | |
Set-Service ssh-agent -StartupType Manual | |
# to get Remove-ItemSafely, i.e. deletion by moving to the trash | |
Install-Module -Name Recycle | |
# Install the OpenSSH Client | |
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0 | |
# Install the OpenSSH Server | |
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 | |
Set-Service -Name sshd -StartupType 'Automatic' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment