Skip to content

Commit 09c8171

Browse files
committed
🐛 fix: fixed typos and updated vscode settings
1 parent 2bd33fe commit 09c8171

File tree

11 files changed

+376
-372
lines changed

11 files changed

+376
-372
lines changed

Functions.ps1

Lines changed: 23 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#requires -Version 7
22

3-
# cSpell:disable
4-
53
function Test-IsElevated {
64
return (New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
75
}
@@ -10,26 +8,25 @@ function Test-DeveloperMode {
108
$RegistryKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
119
if ((Test-Path $RegistryKeyPath) -and (Get-ItemProperty -Path $RegistryKeyPath | Select-Object -ExpandProperty AllowDevelopmentWithoutDevLicense)) {
1210
return $true
13-
}
14-
else {
11+
} else {
1512
return $false
1613
}
1714
}
1815

1916
function Set-GsudoCacheMode {
2017
param([switch]$on, [switch]$off)
2118
if (Get-Command gsudo -ErrorAction SilentlyContinue) {
22-
if ($on) {
19+
if ($on) {
2320
# Write-PrettyTitle "Enable Gsudo CacheMode"
2421
Start-Sleep -Seconds 5
25-
& gsudo cache on
22+
& gsudo cache on
2623
}
27-
if ($off) {
24+
if ($off) {
2825
# Write-PrettyTitle "Disable Gsudo CacheMode"
2926
Start-Sleep -Seconds 5
30-
& gsudo cache off
27+
& gsudo cache off
3128
}
32-
}
29+
}
3330
}
3431

3532
###################################################################################################
@@ -64,8 +61,7 @@ function Write-PrettyOutput {
6461
Write-Host "$Entry" -ForegroundColor Magenta -NoNewline
6562
Write-Host " $Entry2 " -ForegroundColor Yellow -NoNewline
6663
Write-Host "$Message"
67-
}
68-
else {
64+
} else {
6965
Write-Host "$Process" -ForegroundColor Green -NoNewline
7066
Write-Host "" -ForegroundColor DarkGray -NoNewline
7167
Write-Host "$Entry" -ForegroundColor Yellow -NoNewline
@@ -95,9 +91,8 @@ function Install-WingetApps {
9591
$installed = winget list --exact --accept-source-agreements -q $app
9692
if (![String]::Join("", $installed).Contains($app)) {
9793
gum spin --title="Installing $app..." -- winget install --exact --silent --accept-package-agreements --accept-source-agreements $app -s winget
98-
Write-PrettyOutput -Process "winget" -Entry "$app" -Message "installed sucessfully."
99-
}
100-
else {
94+
Write-PrettyOutput -Process "winget" -Entry "$app" -Message "installed successfully."
95+
} else {
10196
Write-PrettyOutput -Process "winget" -Entry "$app" -Message "already installed! Skipping..."
10297
}
10398
}
@@ -110,8 +105,7 @@ function Enable-ScoopBuckets {
110105
if (!(Test-Path -PathType Container -Path "$scoopBucketDir\$bucket")) {
111106
gum spin --title="Adding $bucket to Scoop..." -- scoop bucket add $bucket
112107
Write-PrettyOutput -Process "scoop" -Entry "bucket:" -Entry2 "$bucket" -Message "added for scoop." -Extra
113-
}
114-
else {
108+
} else {
115109
Write-PrettyOutput -Process "scoop" -Entry "bucket:" -Entry2 "$bucket" -Message "already added! Skipping..." -Extra
116110
}
117111
}
@@ -129,18 +123,15 @@ function Install-ScoopApps {
129123
if ($Scope -eq 'AllUsers') {
130124
if ($(gsudo status IsElevated) -eq $False) {
131125
gum spin --title="Installing $app globally..." -- gsudo scoop install $app --global
132-
}
133-
else {
126+
} else {
134127
gum spin --title="Installing $app globally..." -- scoop install $app --global
135128
}
136129
Write-PrettyOutput -Process "scoop" -Entry "app:" -Entry2 "$app" -Message "globally installed successfully." -Extra
137-
}
138-
else {
130+
} else {
139131
gum spin --title="Installing $app..." -- scoop install $app
140132
Write-PrettyOutput -Process "scoop" -Entry "app:" -Entry2 "$app" -Message "installed successfully." -Extra
141133
}
142-
}
143-
else {
134+
} else {
144135
Write-PrettyOutput -Process "scoop" -Entry "app:" -Entry2 "$app" -Message "already installed! Skipping..." -Extra
145136
}
146137
}
@@ -153,8 +144,7 @@ function Install-Modules {
153144
if (!(Get-Module -ListAvailable -Name $module -ErrorAction SilentlyContinue)) {
154145
Install-Module -Name $module -AllowClobber -Scope CurrentUser -Force
155146
Write-PrettyOutput -Process "pwsh" -Entry "module:" -Entry2 "$module" -Message "installed successfully." -Extra
156-
}
157-
else {
147+
} else {
158148
Write-PrettyOutput -Process "pwsh" -Entry "module:" -Entry2 "$module" -Message "already installed! Skipping..." -Extra
159149
}
160150
}
@@ -178,8 +168,7 @@ function Install-VSCode-Extensions {
178168
if (-not ($installed | Select-String $ext)) {
179169
gum spin --title="Installing extension $ext..." -- code --install-extension $ext --force
180170
Write-PrettyOutput -Process "vscode" -Entry "extension:" -Entry2 "$ext" -Message "installed successfully." -Extra
181-
}
182-
else {
171+
} else {
183172
Write-PrettyOutput -Process "vscode" -Entry "extension:" -Entry2 "$ext" -Message "already installed. Skipping..." -Extra
184173
}
185174
}
@@ -196,8 +185,7 @@ function Install-GitHub-Extensions {
196185
if (-not ($installed | Select-String "$extRepo")) {
197186
gum spin --title="Installing extension $extName..." -- gh extension install "$extRepo" --force
198187
Write-PrettyOutput -Process "github" -Entry "extension:" -Entry2 "$extName" -Message "installed successfully." -Extra
199-
}
200-
else {
188+
} else {
201189
Write-PrettyOutput -Process "github" -Entry "extension:" -Entry2 "$extName" -Message "already installed. Skipping..." -Extra
202190
}
203191
}
@@ -214,8 +202,7 @@ function Install-NPM-Packages {
214202
npm install --global --silent $package
215203
Write-PrettyOutput -Process "nvm" -Entry "npm:" -Entry2 "$package" -Message "installed successfully." -Extra
216204
}
217-
}
218-
else {
205+
} else {
219206
foreach ($package in $packages) {
220207
Write-PrettyOutput -Process "nvm" -Entry "npm:" -Entry2 "$package" -Message "already installed. Skipping..." -Extra
221208
}
@@ -229,10 +216,9 @@ function Install-Vagrant-Plugins {
229216
$installed = (vagrant plugin list)
230217
foreach ($plugin in $List) {
231218
if (!($installed | Select-String "$plugin")) {
232-
gum spin --title="Instaling plugin $plugin..." -- vagrant plugin install $plugin
219+
gum spin --title="Installing plugin $plugin..." -- vagrant plugin install $plugin
233220
Write-PrettyOutput -Process "vagrant" -Entry "plugin:" -Entry2 "$plugin" -Message "installed successfully." -Extra
234-
}
235-
else {
221+
} else {
236222
Write-PrettyOutput -Process "vagrant" -Entry "plugin:" -Entry2 "$plugin" -Message "already installed. Skipping..." -Extra
237223
}
238224
}
@@ -250,8 +236,7 @@ function Install-NerdFonts {
250236
if (!($installedFonts | Select-String "$fontName")) {
251237
& ([scriptblock]::Create((Invoke-WebRequest 'https://to.loredo.me/Install-NerdFont.ps1'))) -Confirm:$false -Scope AllUsers -Name $fontShortName
252238
Write-PrettyOutput -Process "nerd font" -Entry "$fontName" -Message "installed successfully."
253-
}
254-
else {
239+
} else {
255240
Write-PrettyOutput -Process "nerd font" -Entry "$fontName" -Message "already installed. Skipping..."
256241
}
257242
}
@@ -270,8 +255,7 @@ function Set-Symlinks {
270255
$symlinkFile | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue
271256
if (((Test-DeveloperMode) -eq $False) -and ((Test-IsElevated) -eq $False)) {
272257
gsudo { New-Item -ItemType SymbolicLink -Path $symlinkKey -Target $symLinkTarget -Force | Out-Null }
273-
}
274-
else {
258+
} else {
275259
New-Item -ItemType SymbolicLink -Path $symlinkKey -Target $symLinkTarget -Force | Out-Null
276260
}
277261
Write-PrettyOutput "symlink" -Entry "$symlinkKey" -Entry2 "=> $symlinkTarget" -Message "added." -Extra
@@ -285,8 +269,7 @@ function Set-EnvironmentVariable {
285269
if (!([System.Environment]::GetEnvironmentVariable("$Value"))) {
286270
[System.Environment]::SetEnvironmentVariable("$Value", "$Path", "User")
287271
Write-PrettyOutput -Process "env" -Entry "$Value" -Entry2 "=> $Path" -Message "added." -Extra
288-
}
289-
else {
272+
} else {
290273
Write-PrettyOutput -Process "env" -Entry "$Value" -Entry2 "=> $Path" -Message "already set." -Extra
291274
}
292275
}
@@ -298,8 +281,7 @@ function Download-File {
298281
)
299282
if (Get-Command wget.exe -ErrorAction SilentlyContinue) {
300283
& wget.exe --quiet -P "$Directory" "$Url"
301-
}
302-
else {
284+
} else {
303285
Invoke-WebRequest -Uri "$Url" -OutFile "$Directory"
304286
}
305287
}

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ A Windows 11 Dotfiles Repo infused with <a href="https://catppuccin.com/">Catppu
1919
<a href="https://github.com/jacquindev/windots/"><img src="https://img.shields.io/github/repo-size/jacquindev/windots?style=for-the-badge&logo=hyprland&logoColor=F9E2AF&label=Size&labelColor=302D41&color=F9E2AF" alt="REPO SIZE"></a>&nbsp;&nbsp;
2020
<a href="https://github.com/jacquindev/windots/LICENSE"><img src="https://img.shields.io/github/license/jacquindev/windots?style=for-the-badge&logo=&color=CBA6F7&logoColor=CBA6F7&labelColor=302D41" alt="LICENSE"></a>&nbsp;&nbsp;
2121
<a href="https://github.com/jacquindev/windots/stargazers"><img alt="Stargazers" src="https://img.shields.io/github/stars/jacquindev/windots?style=for-the-badge&logo=starship&color=B7BDF8&logoColor=B7BDF8&labelColor=302D41"></a>&nbsp;&nbsp;
22-
</p>
22+
</p>
2323
</div>
2424

25-
> [!IMPORTANT]<br>
26-
> **Screenshots** are taken on my main monitor, which has the **resolution of 3440x1440**.<br>
25+
> [!IMPORTANT]<br> > **Screenshots** are taken on my main monitor, which has the **resolution of 3440x1440**.<br>
2726
> Works seamlessly on my **1920x1080** monitors as well!
2827
2928
<div align="center">
@@ -95,7 +94,7 @@ git clone https://github.com/jacquindev/windots.git your_location
9594

9695
<details open>
9796
<summary><b>😎 Clink Setup</b></summary>
98-
97+
9998
- In your **`Command Prompt`** console, type:
10099

101100
```cmd
@@ -134,7 +133,7 @@ Follow the below links to download and learn to how to setup:
134133
</tr>
135134
<tr>
136135
<td><a href="https://www.deviantart.com/niivu/art/Catppuccin-for-Windows-11-1076249390">Themes</a></td>
137-
<td><img src="./assets/themes.png" alt="thems"></td>
136+
<td><img src="./assets/themes.png" alt="themes"></td>
138137
</tr>
139138
</table>
140139
</div>

0 commit comments

Comments
 (0)