chezmoi: windows symlink for config
This commit is contained in:
parent
72e4a9f3c7
commit
924e3c1d5f
13
src/run_after__symlink-config_windows.ps1.tmpl
Normal file
13
src/run_after__symlink-config_windows.ps1.tmpl
Normal file
@ -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 -}}
|
Loading…
Reference in New Issue
Block a user