Skip to content

Commit 2c891a1

Browse files
committed
🔨 chore: mini modified
1 parent 81aa6eb commit 2c891a1

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

Setup.ps1

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#requires -Version 7
22
#requires -RunAsAdministrator
33

4-
Write-Host "Start setup process..." -ForegroundColor DarkGray
4+
''; Write-Host "Start setup process..." -ForegroundColor DarkGray
55
$currentLocation = "$($(Get-Location).Path)"
66

77
# set current working directory location
@@ -146,7 +146,15 @@ if (Get-Command gh -ErrorAction SilentlyContinue) {
146146
}
147147

148148
# 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)
150158
if ($installNerdFonts.ToUpper() -eq 'Y') {
151159
& ([scriptblock]::Create((Invoke-WebRequest 'https://to.loredo.me/Install-NerdFont.ps1'))) -Scope AllUsers
152160
}
@@ -205,6 +213,38 @@ if (Get-Command bat -ErrorAction SilentlyContinue) {
205213
bat cache --build >$null 2>&1
206214
}
207215

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+
208248
# add-ons
209249
$pluginItems = $json.package_plugins
210250
foreach ($plugin in $pluginItems) {

0 commit comments

Comments
 (0)