-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.ps1
More file actions
71 lines (59 loc) · 2.05 KB
/
Copy pathbootstrap.ps1
File metadata and controls
71 lines (59 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# windows/bootstrap.ps1
$ErrorActionPreference = "Stop"
function Assert-Command($name) {
if (-not (Get-Command $name -ErrorAction SilentlyContinue)) {
throw "Missing required command: $name. If winget is missing, install/update 'App Installer' from Microsoft Store."
}
}
Assert-Command "winget"
Assert-Command "wsl"
# Apps
$apps = @(
"Microsoft.PowerToys",
"Mozilla.Firefox",
"Discord.Discord",
"Spotify.Spotify",
"Valve.Steam",
"Bitwarden.Bitwarden",
"MullvadVPN.MullvadVPN",
"Notepad++.Notepad++",
"VideoLAN.VLC",
"OBSProject.OBSStudio",
"Audacity.Audacity",
"Soundly.Soundly",
"GodotEngine.GodotEngine",
"Obsidian.Obsidian",
"Alacritty.Alacritty"
)
foreach ($id in $apps) {
Write-Host "Installing: $id"
winget install -e --id $id --accept-package-agreements --accept-source-agreements --silent
}
# Copy Alacritty config + theme from WSL dotfiles (skip if missing)
$targetDir = Join-Path $env:APPDATA "alacritty"
New-Item -ItemType Directory -Force -Path $targetDir | Out-Null
$dstConfig = Join-Path $targetDir "alacritty.toml"
$dstTheme = Join-Path $targetDir "theme.toml"
$distro = (wsl.exe -e sh -lc 'echo $WSL_DISTRO_NAME' 2>$null).Trim()
if (-not $distro) { $distro = "Ubuntu" }
$linuxHome = (wsl.exe -e sh -lc 'echo $HOME' 2>$null).Trim()
if (-not $linuxHome) { $linuxHome = "/home/$env:USERNAME" }
$uncHome = "\\wsl$\$distro" + ($linuxHome -replace "/", "\")
$srcConfig = Join-Path $uncHome "dotfiles\alacritty\alacritty-wsl.toml"
$srcTheme = Join-Path $uncHome "dotfiles\alacritty\theme.toml"
if (Test-Path $srcConfig) {
Write-Host "Copying Alacritty config from: $srcConfig"
Copy-Item $srcConfig $dstConfig -Force
Write-Host "Alacritty config written to: $dstConfig"
} else {
Write-Warning "Skipped Alacritty config copy (not found): $srcConfig"
}
if (Test-Path $srcTheme) {
Write-Host "Copying Alacritty theme from: $srcTheme"
Copy-Item $srcTheme $dstTheme -Force
Write-Host "Alacritty theme written to: $dstTheme"
} else {
Write-Warning "Skipped theme copy (not found): $srcTheme"
}
Write-Host ""
Write-Host "Done."