20 lines
599 B
PowerShell
20 lines
599 B
PowerShell
if (!(Test-Path -PathType Container $env:LOCALAPPDATA\layouts)) {
|
|
New-Item -ItemType Directory -Path $env:LOCALAPPDATA\layouts
|
|
Write-Output "changed: created directory $env:LOCALAPPDATA\layouts"
|
|
}
|
|
|
|
$layouts = (
|
|
'window-wide-right.ps1',
|
|
'window-wide-left.ps1'
|
|
)
|
|
|
|
foreach ($layout in $layouts) {
|
|
$source = "$env:USERPROFILE\Documents\WindowsPowerShell\layouts\$layout"
|
|
$dest = "$env:LOCALAPPDATA\layouts\$layout"
|
|
if (!(Test-Path -PathType Leaf $dest) {
|
|
New-Item -ItemType SymbolicLink -Path "$dest" -Target "$source"
|
|
Write-Output "changed: created symlink $dest"
|
|
}
|
|
}
|
|
}
|