38 lines
1.6 KiB
PowerShell
38 lines
1.6 KiB
PowerShell
# Dotfiles Bootstrap (Windows)
|
|
# Run as Administrator (required for symbolic links without Developer Mode)
|
|
#Requires -RunAsAdministrator
|
|
|
|
$DOTFILES = $PSScriptRoot
|
|
|
|
function New-Link {
|
|
param([string]$Src, [string]$Dst)
|
|
$dir = Split-Path $Dst
|
|
if (-not (Test-Path $dir)) { New-Item -ItemType Directory -Path $dir -Force | Out-Null }
|
|
if (Test-Path $Dst) { Remove-Item $Dst -Force -Recurse }
|
|
# Use Junction for directories, SymbolicLink for files
|
|
if (Test-Path $Src -PathType Container) {
|
|
New-Item -ItemType Junction -Path $Dst -Target $Src | Out-Null
|
|
} else {
|
|
New-Item -ItemType SymbolicLink -Path $Dst -Target $Src | Out-Null
|
|
}
|
|
Write-Host " linked: $Dst"
|
|
}
|
|
|
|
Write-Host "=== Dotfiles Bootstrap (Windows) ==="
|
|
|
|
# ── Oh My Posh (Windows alternative to oh-my-zsh + p10k) ─────────────────────
|
|
# NOTE: Windows uses PowerShell, not Zsh. The .zshrc / p10k configs only apply
|
|
# on Linux/WSL. Install Oh My Posh separately if desired:
|
|
# winget install JanDeDobbeleer.OhMyPosh
|
|
|
|
# ── Symlinks ──────────────────────────────────────────────────────────────────
|
|
Write-Host "Creating symlinks..."
|
|
|
|
# WezTerm: reads from $HOME\.wezterm.lua
|
|
New-Link "$DOTFILES\wezterm\wezterm.lua" "$env:USERPROFILE\.wezterm.lua"
|
|
|
|
# Neovim: reads from $env:LOCALAPPDATA\nvim
|
|
New-Link "$DOTFILES\nvim" "$env:LOCALAPPDATA\nvim"
|
|
|
|
Write-Host ""
|
|
Write-Host "Done! Neovim plugins will install automatically on first launch."
|