Skip to content

Commit ed17bda

Browse files
committed
updated windots
1 parent adb9ae3 commit ed17bda

File tree

3 files changed

+47
-44
lines changed

3 files changed

+47
-44
lines changed

Functions.ps1

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ function Install-Vagrant-Plugins {
219219
$installed = (vagrant plugin list)
220220
foreach ($plugin in $List) {
221221
if (!($installed | Select-String "$plugin")) {
222-
gum spin --title="Instaling vagrant plugin $plugin..." -- vagrant install $plugin
222+
gum spin --title="Instaling plugin $plugin..." -- vagrant plugin install $plugin
223223
Write-PrettyOutput -Process "vagrant" -Entry "plugin:" -Entry2 "$plugin" -Message "installed successfully." -Extra
224224
}
225225
else {
@@ -294,17 +294,6 @@ function Download-File {
294294
}
295295
}
296296

297-
function Write-GitConfigLocal {
298-
param ([string]$Path)
299-
$gitUserName = (gum input --prompt="Input Git Name: " --placeholder="Your Name")
300-
$gitUserMail = (gum input --prompt="Input Git Email: " --placeholder="youremail@domain.com")
301-
302-
"[user]" | Out-File -FilePath "$Path" -Append
303-
" $gitUserName" | Out-File -FilePath "$Path" -Append
304-
" $gitUserMail" | Out-File -FilePath "$Path" -Append
305-
Write-PrettyInfo -Message "Git Email and Name set successfully in" -Info "$Path"
306-
}
307-
308297
###################################################################################################
309298
### UNINSTALL FUNCTIONS ###
310299
###################################################################################################

Setup.ps1

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,39 @@ function Install {
162162
Install-NerdFonts -List $nerdFonts
163163
Start-Sleep -Seconds 1
164164

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+
165188
# Symlinks
166189
Write-PrettyTitle "SYMBOLIC LINKS"
167190
Set-Symlinks -Symlinks $symbolicLinks
168191

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+
169198
# Powershell Modules
170199
Write-PrettyTitle "POWERSHELL MODULES"
171200
Install-Modules -List $poshModules
@@ -180,44 +209,18 @@ function Install {
180209
Write-PrettyInfo -Message "VSCode Extensions List can be found at" -Info "$PSScriptRoot\vscode\extensions.list"
181210
}
182211

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-
209212
# NodeJS setup
210213
if (Get-Command nvm -ErrorAction SilentlyContinue) {
211214
Write-PrettyTitle "NVM (Node Version Manager)"
212215
if (!(Get-Command npm -ErrorAction SilentlyContinue)) {
213216
$ltsOrLatest = $(Write-Host "NodeJS not found. Install LTS (y) or latest (n)? "-ForegroundColor Magenta -NoNewline; Read-Host)
214217
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
217220
}
218221
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
221224
}
222225
corepack enable
223226
npm config set userconfig="$env:USERPROFILE\.config\npm\.npmrc" --global
@@ -239,6 +242,7 @@ function Install {
239242
if (Get-Command eza -ErrorAction SilentlyContinue) {
240243
Write-PrettyTitle "EZA CONFIG ENVIRONMENT VARIABLE"
241244
Set-EnvironmentVariable -Value "EZA_CONFIG_DIR" -Path "$Env:USERPROFILE\.config\eza"
245+
Start-Sleep -Seconds 1
242246
}
243247

244248
# BTOP
@@ -256,6 +260,7 @@ function Install {
256260
}
257261
}
258262
Remove-Variable catppuccinThemes, btopThemeDir
263+
Start-Sleep -Seconds 1
259264
}
260265

261266
# flow launcher
@@ -275,6 +280,7 @@ function Install {
275280
}
276281
}
277282
Remove-Variable flowThemeDir, catppuccinThemes
283+
Start-Sleep -Seconds 1
278284
}
279285

280286
# spicetify
@@ -290,6 +296,7 @@ function Install {
290296
Write-PrettyOutput -Process "spicetify" -Entry "custom app:" -Entry2 "marketplace" -Message "already installed." -Extra
291297
}
292298
}
299+
Start-Sleep -Seconds 1
293300
}
294301

295302
if (Get-Command yazi -ErrorAction SilentlyContinue) {
@@ -300,17 +307,20 @@ function Install {
300307
Set-EnvironmentVariable -Value "YAZI_FILE_ONE" -Path "$GitFileExePath"
301308
Set-EnvironmentVariable -Value "YAZI_CONFIG_HOME" -Path "$Env:USERPROFILE\.config\yazi"
302309
Remove-Variable GitInstalledDir, GitFileExePath
310+
Start-Sleep -Seconds 1
303311
# yazi plugins
304312
gum spin --title="Installing yazi plugins..." -- ya pack -i
305313
gum spin --title="Updating yazi plugins..." -- ya pack -u
306314
Write-PrettyInfo -Message "Installed Yazi Plugins can be found at" -Info "$PSScriptRoot\config\yazi\package.toml"
315+
Start-Sleep -Seconds 1
307316
}
308317

309318
if (Get-Command komorebic -ErrorAction SilentlyContinue) {
310319
Write-PrettyTitle "KOMOREBI SETUP WITH WHKD"
311320

312321
# komorebi environment variable
313322
Set-EnvironmentVariable -Value "KOMOREBI_CONFIG_HOME" -Path "$Env:USERPROFILE\.config\komorebi"
323+
Start-Sleep -Seconds 1
314324

315325
# start komorebi
316326
$komorebiProcess = Get-Process -Name komorebi -ErrorAction SilentlyContinue
@@ -327,6 +337,7 @@ function Install {
327337
else {
328338
Write-PrettyOutput -Process "komorebi" -Entry "komorebi with WHKD" -Message "already running..."
329339
}
340+
Start-Sleep -Seconds 1
330341
}
331342

332343
if (Get-Command yasb -ErrorAction SilentlyContinue) {
@@ -351,6 +362,7 @@ function Install {
351362
else {
352363
Write-PrettyOutput -Process "yasb" -Entry "status bar" -Message "already running..."
353364
}
365+
Start-Sleep -Seconds 1
354366
}
355367

356368
# vagrant

home/.gitconfig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
hyperlinks = true
3434
hyperlinks-file-link-format = "vscode://file/{path}:{line}"
3535
[include]
36-
path = ~/.gitconfig-local
3736
path = ~/.config/delta/themes/themes.gitconfig
3837
[interactive]
3938
diffFilter = delta --color-only
@@ -58,4 +57,7 @@
5857
clean = git-lfs clean -- %f
5958
smudge = git-lfs smudge -- %f
6059
process = git-lfs filter-process
61-
required = true
60+
required = true
61+
[user]
62+
name = Jacquin Moon
63+
email = jacquindev@outlook.com

0 commit comments

Comments
 (0)