@@ -162,10 +162,39 @@ function Install {
162
162
Install-NerdFonts - List $nerdFonts
163
163
Start-Sleep - Seconds 1
164
164
165
+ # Git & GitHub CLI setup
166
+ Write-PrettyTitle " GIT SETUP"
167
+ $gitUserName = (git config -- global user.name)
168
+ $gitUserMail = (git config -- global user.email)
169
+
170
+ if ($null -eq $gitUserName ) {
171
+ $gitUserName = (gum input -- prompt= " Input Git Name: " -- placeholder= " Your Name" )
172
+ }
173
+ if ($null -eq $gitUserMail ) {
174
+ $gitUserMail = (gum input -- prompt= " Input Git Email: " -- placeholder= " yourmail@domain.com" )
175
+ }
176
+
177
+ if (Get-Command gh - ErrorAction SilentlyContinue) {
178
+ if (! (Test-Path - PathType Leaf - Path " $env: APPDATA \GitHub CLI\hosts.yml" )) {
179
+ gh auth login
180
+ }
181
+ Install-GitHub - Extensions - List $githubExtensions
182
+ }
183
+
184
+ Set-Location " $PSScriptRoot "
185
+ git submodule update -- init -- recursive
186
+
187
+
165
188
# Symlinks
166
189
Write-PrettyTitle " SYMBOLIC LINKS"
167
190
Set-Symlinks - Symlinks $symbolicLinks
168
191
192
+ git config -- global -- unset user.email | Out-Null
193
+ git config -- global -- unset user.name | Out-Null
194
+ git config -- global user.name $gitUserName | Out-Null
195
+ git config -- global user.email $gitUserMail | Out-Null
196
+
197
+
169
198
# Powershell Modules
170
199
Write-PrettyTitle " POWERSHELL MODULES"
171
200
Install-Modules - List $poshModules
@@ -180,44 +209,18 @@ function Install {
180
209
Write-PrettyInfo - Message " VSCode Extensions List can be found at" - Info " $PSScriptRoot \vscode\extensions.list"
181
210
}
182
211
183
- # Git & GitHub CLI setup
184
- if (Get-Command git - ErrorAction SilentlyContinue) {
185
- Write-PrettyTitle " GIT SETUP"
186
- if (Test-Path - Path " $env: USERPROFILE \.gitconfig-local" ) {
187
- if ($ (Get-Content - Path " $env: USERPROFILE \.gitconfig-local" - Raw).Contains(" [user]" ) -eq $False ) {
188
- Write-GitConfigLocal - Path " $env: USERPROFILE \.gitconfig-local"
189
- }
190
- else {
191
- Write-PrettyInfo - Message " Git Email and Name already set in" - Info " $env: USERPROFILE \.gitconfig-local"
192
- }
193
- }
194
- else {
195
- New-Item - Path " $env: USERPROFILE \.gitconfig-local" - ItemType File | Out-Null
196
- Write-GitConfigLocal - Path " $env: USERPROFILE \.gitconfig-local"
197
- }
198
- Set-Location " $PSScriptRoot "
199
- git submodule update -- init -- recursive
200
-
201
- if (Get-Command gh - ErrorAction SilentlyContinue) {
202
- if (! (Test-Path - PathType Leaf - Path " $env: APPDATA \GitHub CLI\hosts.yml" )) {
203
- gh auth login
204
- }
205
- Install-GitHub - Extensions - List $githubExtensions
206
- }
207
- }
208
-
209
212
# NodeJS setup
210
213
if (Get-Command nvm - ErrorAction SilentlyContinue) {
211
214
Write-PrettyTitle " NVM (Node Version Manager)"
212
215
if (! (Get-Command npm - ErrorAction SilentlyContinue)) {
213
216
$ltsOrLatest = $ (Write-Host " NodeJS not found. Install LTS (y) or latest (n)? " - ForegroundColor Magenta - NoNewline; Read-Host )
214
217
if ($ltsOrLatest -eq ' y' ) {
215
- gum spin -- title = " Installing LTS Node... " -- nvm install lts
216
- gum spin -- title = " Installing LTS Node... " -- nvm use lts
218
+ nvm install lts
219
+ nvm use lts
217
220
}
218
221
else {
219
- gum spin -- title = " Installing latest Node... " -- nvm install latest
220
- gum spin -- title = " Installing latest Node... " -- nvm use latest
222
+ nvm install latest
223
+ nvm use latest
221
224
}
222
225
corepack enable
223
226
npm config set userconfig= " $env: USERPROFILE \.config\npm\.npmrc" -- global
@@ -239,6 +242,7 @@ function Install {
239
242
if (Get-Command eza - ErrorAction SilentlyContinue) {
240
243
Write-PrettyTitle " EZA CONFIG ENVIRONMENT VARIABLE"
241
244
Set-EnvironmentVariable - Value " EZA_CONFIG_DIR" - Path " $Env: USERPROFILE \.config\eza"
245
+ Start-Sleep - Seconds 1
242
246
}
243
247
244
248
# BTOP
@@ -256,6 +260,7 @@ function Install {
256
260
}
257
261
}
258
262
Remove-Variable catppuccinThemes, btopThemeDir
263
+ Start-Sleep - Seconds 1
259
264
}
260
265
261
266
# flow launcher
@@ -275,6 +280,7 @@ function Install {
275
280
}
276
281
}
277
282
Remove-Variable flowThemeDir, catppuccinThemes
283
+ Start-Sleep - Seconds 1
278
284
}
279
285
280
286
# spicetify
@@ -290,6 +296,7 @@ function Install {
290
296
Write-PrettyOutput - Process " spicetify" - Entry " custom app:" - Entry2 " marketplace" - Message " already installed." - Extra
291
297
}
292
298
}
299
+ Start-Sleep - Seconds 1
293
300
}
294
301
295
302
if (Get-Command yazi - ErrorAction SilentlyContinue) {
@@ -300,17 +307,20 @@ function Install {
300
307
Set-EnvironmentVariable - Value " YAZI_FILE_ONE" - Path " $GitFileExePath "
301
308
Set-EnvironmentVariable - Value " YAZI_CONFIG_HOME" - Path " $Env: USERPROFILE \.config\yazi"
302
309
Remove-Variable GitInstalledDir, GitFileExePath
310
+ Start-Sleep - Seconds 1
303
311
# yazi plugins
304
312
gum spin -- title= " Installing yazi plugins..." -- ya pack - i
305
313
gum spin -- title= " Updating yazi plugins..." -- ya pack - u
306
314
Write-PrettyInfo - Message " Installed Yazi Plugins can be found at" - Info " $PSScriptRoot \config\yazi\package.toml"
315
+ Start-Sleep - Seconds 1
307
316
}
308
317
309
318
if (Get-Command komorebic - ErrorAction SilentlyContinue) {
310
319
Write-PrettyTitle " KOMOREBI SETUP WITH WHKD"
311
320
312
321
# komorebi environment variable
313
322
Set-EnvironmentVariable - Value " KOMOREBI_CONFIG_HOME" - Path " $Env: USERPROFILE \.config\komorebi"
323
+ Start-Sleep - Seconds 1
314
324
315
325
# start komorebi
316
326
$komorebiProcess = Get-Process - Name komorebi - ErrorAction SilentlyContinue
@@ -327,6 +337,7 @@ function Install {
327
337
else {
328
338
Write-PrettyOutput - Process " komorebi" - Entry " komorebi with WHKD" - Message " already running..."
329
339
}
340
+ Start-Sleep - Seconds 1
330
341
}
331
342
332
343
if (Get-Command yasb - ErrorAction SilentlyContinue) {
@@ -351,6 +362,7 @@ function Install {
351
362
else {
352
363
Write-PrettyOutput - Process " yasb" - Entry " status bar" - Message " already running..."
353
364
}
365
+ Start-Sleep - Seconds 1
354
366
}
355
367
356
368
# vagrant
0 commit comments