-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.ps1
54 lines (42 loc) · 1.81 KB
/
setup.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
function Update-Link ($target, $link) {
New-Item -Path $link -ItemType SymbolicLink -Value $target -Force
}
$appData = (Get-Item -Path Env:appdata).Value
$userProfile = $env:USERPROFILE
# Add Long path suport.
Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1
# Lazygit 🦥
$lazygitConfig = Join-Path $PSScriptRoot "lazygit\config.yml"
$lazygitFolder = $appData + "\lazygit\"
if (-not (Test-Path -LiteralPath $lazygitFolder)) {
New-Item -ItemType Directory $lazygitFolder
}
Write-Host $lazygitConfig
Update-Link $lazygitConfig ($lazygitFolder + "\config.yml")
# PowerShell Profile
if (-not (Test-Path -LiteralPath $Profile)) {
New-Item -ItemType File $Profile -Force
}
$powerShellRoot = Join-Path $PSScriptRoot "powershell\main.ps1"
Write-Host $powerShellRoot
$powerShellRoot | Out-File -FilePath $Profile
#IdeaVim
$ideaVimConfig = Join-Path $PSScriptRoot ".\ideavim\.ideavimrc"
Update-Link $ideaVimConfig ($userProfile + "\.ideavimrc")
# Alacritty 🦥
$alacrittyConfig = Join-Path $PSScriptRoot "alacritty-windows\alacritty.toml"
$alacrittyThemeConfig = Join-Path $PSScriptRoot "alacritty-windows\themes\catppuccin-mocha.toml"
$alacrittyFolder = $appData + "\alacritty\"
$alacrittyThemesFolder = $appData + "\alacritty\themes\"
if (-not (Test-Path -LiteralPath $alacrittyFolder)) {
New-Item -ItemType Directory $alacrittyFolder
}
if (-not (Test-Path -LiteralPath $alacrittyThemesFolder)) {
New-Item -ItemType Directory $alacrittyThemesFolder
}
Update-Link $alacrittyConfig ($alacrittyFolder + "\alacritty.toml")
Update-Link $alacrittyThemeConfig ($alacrittyThemesFolder + "\catppuccin-mocha.toml")
# NEOVIM
$neovimInputFolder = Join-Path $PSScriptRoot "nvim\"
$neovimOutputFolder = $appData + "/../Local/nvim/"
Update-Link $neovimInputFolder $neovimOutputFolder