|
1 | 1 | #requires -Version 7 |
2 | 2 | #requires -RunAsAdministrator |
3 | 3 |
|
4 | | -Write-Host "Start setup process..." -ForegroundColor DarkGray |
| 4 | +''; Write-Host "Start setup process..." -ForegroundColor DarkGray |
5 | 5 | $currentLocation = "$($(Get-Location).Path)" |
6 | 6 |
|
7 | 7 | # set current working directory location |
@@ -146,7 +146,15 @@ if (Get-Command gh -ErrorAction SilentlyContinue) { |
146 | 146 | } |
147 | 147 |
|
148 | 148 | # install nerd fonts |
149 | | -''; $installNerdFonts = $(Write-Host "[RECOMMENDED] Install NerdFont now? (Y/n): " -NoNewline -ForegroundColor Magenta; Read-Host) |
| 149 | +'' |
| 150 | +Write-Host "The following fonts are highly recommended: " -ForegroundColor Green -NoNewline |
| 151 | +Write-Host "(Please skip this step if you already installed Nerd Fonts)" -ForegroundColor DarkGray |
| 152 | +Write-Output " ● Cascadia Code Nerd Font" |
| 153 | +Write-Output " ● FantasqueSansM Nerd Font" |
| 154 | +Write-Output " ● FiraCode Nerd Font" |
| 155 | +Write-Output " ● JetBrainsMono Nerd Font" |
| 156 | +'' |
| 157 | +$installNerdFonts = $(Write-Host "[RECOMMENDED] Install NerdFont now? (Y/n): " -NoNewline -ForegroundColor Magenta; Read-Host) |
150 | 158 | if ($installNerdFonts.ToUpper() -eq 'Y') { |
151 | 159 | & ([scriptblock]::Create((Invoke-WebRequest 'https://to.loredo.me/Install-NerdFont.ps1'))) -Scope AllUsers |
152 | 160 | } |
@@ -205,6 +213,38 @@ if (Get-Command bat -ErrorAction SilentlyContinue) { |
205 | 213 | bat cache --build >$null 2>&1 |
206 | 214 | } |
207 | 215 |
|
| 216 | +# yazi plugins |
| 217 | +if (Get-Command ya -ErrorAction SilentlyContinue) { |
| 218 | + ya pack -i >$null 2>&1 |
| 219 | + ya pack -u >$null 2>&1 |
| 220 | +} |
| 221 | + |
| 222 | +$catppuccinThemes = @('Frappe', 'Latte', 'Macchiato', 'Mocha') |
| 223 | +# add flowlauncher themes |
| 224 | +$flowLauncherDir = "$env:LOCALAPPDATA\FlowLauncher" |
| 225 | +if (Test-Path "$flowLauncherDir" -PathType Container) { |
| 226 | + $flowLauncherThemeDir = "$flowLauncherDir\Themes" |
| 227 | + $catppuccinThemes | ForEach-Object { |
| 228 | + if (!(Test-Path "$flowLauncherThemeDir\Catppuccin $_.xaml" -PathType Leaf)) { |
| 229 | + $flowLauncherThemeUrl = "https://raw.githubusercontent.com/catppuccin/flow-launcher/refs/heads/main/themes/Catppuccin%20$_.xaml" |
| 230 | + Invoke-WebRequest -Uri "$flowLauncherThemeUrl" -OutFile "$flowLauncherThemeDir" |
| 231 | + } |
| 232 | + } |
| 233 | +} |
| 234 | + |
| 235 | +# add btop theme |
| 236 | +# since we install btop by scoop, then the application folder would be in scoop directory |
| 237 | +if (Get-Command btop -ErrorAction SilentlyContinue) { |
| 238 | + $btopThemeDir = "$env:USERPROFILE\scoop\apps\btop\current\themes" |
| 239 | + $catppuccinThemes = $catppuccinThemes.ToLower() |
| 240 | + $catppuccinThemes | ForEach-Object { |
| 241 | + if (!(Test-Path "$btopThemeDir\catppuccin_$_.theme" -PathType Leaf)) { |
| 242 | + $btopThemeUrl = "https://raw.githubusercontent.com/catppuccin/btop/refs/heads/main/themes/catppuccin_$_.theme" |
| 243 | + Invoke-WebRequest -Uri "$btopThemeUrl" -OutFile "$btopThemeDir" |
| 244 | + } |
| 245 | + } |
| 246 | +} |
| 247 | + |
208 | 248 | # add-ons |
209 | 249 | $pluginItems = $json.package_plugins |
210 | 250 | foreach ($plugin in $pluginItems) { |
|
0 commit comments