diff --git a/src/run_after__symlink-config_windows.ps1.tmpl b/src/run_after__symlink-config_windows.ps1.tmpl new file mode 100644 index 0000000..81da457 --- /dev/null +++ b/src/run_after__symlink-config_windows.ps1.tmpl @@ -0,0 +1,13 @@ +{{- /* symlink into ~/.config on windows */ -}} + +{{- $confdirs := list "nvim" "alacritty" "nushell" -}} + +{{- if eq .chezmoi.os "windows" -}} +$confdir = ([Environment]::GetFolderPath("ApplicationData")) +$userdir = ([Environment]::GetFolderPath("UserProfile")) +{{ range $confdirs }} +If (-Not (Test-Path $confdir\{{ . }})) { + New-Item -Path $confdir\{{ . }} -ItemType Junction -Value $userdir\.config\{{ . }} +} +{{ end }} +{{- end -}}