this repo has no description
1#at top of script
2if (!
3 #current role
4 (New-Object Security.Principal.WindowsPrincipal(
5 [Security.Principal.WindowsIdentity]::GetCurrent()
6 #is admin?
7 )).IsInRole(
8 [Security.Principal.WindowsBuiltInRole]::Administrator
9 )
10) {
11 #elevate script and exit current non-elevated runtime
12 Start-Process `
13 -FilePath 'powershell' `
14 -ArgumentList (
15 #flatten to single array
16 '-File', $MyInvocation.MyCommand.Source, $args `
17 | %{ $_ }
18 ) `
19 -Verb RunAs
20 exit
21}
22function New-Link ($target, $link) {
23 New-Item -Path $link -ItemType SymbolicLink -Value $target -Force
24}
25
26#New-Link $HOME/nvim/.config/nvim $HOME/.config/nvim
27#New-Link $HOME/starship/.config/starship.toml $HOME/.config/starship.toml
28#New-Link $HOME/Microsoft.PowerShell_profile.ps1 $PROFILE
29#New-Link $HOME/ssh/.ssh/config $HOME/.ssh/config
30New-Link $HOME/.config/helix $env:APPDATA/helix
31New-Link $HOME/dprint/.dprint.json $HOME/.dprint.json