Skip to content

Commit

Permalink
Trim Trailing Whitespace (#1085)
Browse files Browse the repository at this point in the history
* Trim Trailing Whitespace

* Revert "Trim Trailing Whitespace"

This reverts commit 0ce32aa.

* Trim Trailing Whitespace, take 2
  • Loading branch information
Carterpersall authored Oct 4, 2023
1 parent 672b083 commit 3585892
Show file tree
Hide file tree
Showing 43 changed files with 142 additions and 142 deletions.
4 changes: 2 additions & 2 deletions Compile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ Get-ChildItem .\functions -Recurse -File | ForEach-Object {

Get-ChildItem .\xaml | ForEach-Object {
$xaml = (Get-Content $psitem.FullName).replace("'","''")

Write-output "`$$($psitem.BaseName) = '$xaml'" | Out-File ./$scriptname -Append -Encoding ascii
}

Get-ChildItem .\config | Where-Object {$psitem.extension -eq ".json"} | ForEach-Object {
$json = (Get-Content $psitem.FullName).replace("'","''")

Write-output "`$sync.configs.$($psitem.BaseName) = '$json' `| convertfrom-json" | Out-File ./$scriptname -Append -Encoding ascii
}

Expand Down
4 changes: 2 additions & 2 deletions config/applications.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"WPFInstall7zip": {
"winget": "7zip.7zip",
"choco": "7zip"
Expand Down Expand Up @@ -546,7 +546,7 @@
"WPFInstalltidal": {
"Winget": "9NNCB5BS59PH",
"choco": "na"
},
},
"WPFInstallubisoft": {
"winget": "Ubisoft.Connect",
"choco": "ubisoft-connect"
Expand Down
2 changes: 1 addition & 1 deletion config/feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"Microsoft-Windows-Subsystem-Linux"
],
"InvokeScript": [

]
},
"WPFFeaturenfs": {
Expand Down
38 changes: 19 additions & 19 deletions config/helperscript.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Example:
"ClientForNFS-Infrastructure",
"NFS-Administration"
]
}
}
#>

# Modify the variables and run his code. It will import the current file and add your addition. From there you can create a pull request.
Expand Down Expand Up @@ -147,14 +147,14 @@ Example:
"EssTweaksServices",
"EssTweaksTele"
]
}
}
#>

# Modify the variables and run his code. It will import the current file and add your addition. From there you can create a pull request.

$NameofButton = "WPF" + ""
$commands = @(

)

$jsonfile = Get-Content ./config/preset.json | ConvertFrom-Json
Expand Down Expand Up @@ -186,21 +186,21 @@ $jsonfile | ConvertTo-Json | Out-File ./config/preset.json
"Path": "Path in registry",
"Name": "Name of Registry key",
"Type": "Item type",
"Value": "Value to modify",
"Value": "Value to modify",
"OriginalValue": "value to reset"
}
],
"service" : [
{
"Name": "Name of service",
"StartupType": "Startup type to set",
"StartupType": "Startup type to set",
"OriginalType": "Startup type to reset"
}
],
"ScheduledTask" : [
{
"Name": "Path to scheduled task",
"State": "State to set",
"State": "State to set",
"OriginalState": "State to reset"
}
],
Expand All @@ -211,10 +211,10 @@ $jsonfile | ConvertTo-Json | Out-File ./config/preset.json
"InvokeScript": [
"Script to make modifications not possible with the above types
Special care needs to be taken here as converting from json to a scriptblock
can cause weird issues. Please look at the example below to get an idea of how things should work"
can cause weird issues. Please look at the example below to get an idea of how things should work"
],
"UndoScript": [
"Same as above however is meant to undo what you did above"
"Same as above however is meant to undo what you did above"
]
}
}
Expand All @@ -228,14 +228,14 @@ Example:
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System",
"Name": "EnableActivityFeed",
"Type": "DWord",
"Value": "0",
"Value": "0",
"OriginalValue": "1"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System",
"Name": "PublishUserActivities",
"Type": "DWord",
"Value": "0",
"Value": "0",
"OriginalValue": "1"
}
]
Expand All @@ -244,12 +244,12 @@ Example:
"service" : [
{
"Name": "HomeGroupListener",
"StartupType": "Manual",
"StartupType": "Manual",
"OriginalType": "Automatic"
},
{
"Name": "HomeGroupProvider",
"StartupType": "Manual",
"StartupType": "Manual",
"OriginalType": "Automatic"
}
]
Expand All @@ -258,12 +258,12 @@ Example:
"ScheduledTask" : [
{
"Name": "Microsoft\\Windows\\Application Experience\\Microsoft Compatibility Appraiser",
"State": "Disabled",
"State": "Disabled",
"OriginalState": "Enabled"
},
},
{
"Name": "Microsoft\\Windows\\Application Experience\\ProgramDataUpdater",
"State": "Disabled",
"State": "Disabled",
"OriginalState": "Enabled"
}
]
Expand All @@ -279,7 +279,7 @@ Example:
"Import-Module BitsTransfer
Start-BitsTransfer -Source \"https://raw.githubusercontent.com/ChrisTitusTech/win10script/master/ooshutup10.cfg\" -Destination C:\\Windows\\Temp\\ooshutup10.cfg
Start-BitsTransfer -Source \"https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe\" -Destination C:\\Windows\\Temp\\OOSU10.exe
C:\\Windows\\Temp\\OOSU10.exe C:\\Windows\\Temp\\ooshutup10.cfg /quiet"
C:\\Windows\\Temp\\OOSU10.exe C:\\Windows\\Temp\\ooshutup10.cfg /quiet"
]
}
}
Expand Down Expand Up @@ -323,11 +323,11 @@ Example:
#)

#$InvokeScript = @(
# ""
# ""
#)

#$UndoScript = @(
# ""
# ""
#)

$NameofButton = "WPF" + ""
Expand Down Expand Up @@ -375,7 +375,7 @@ Example:
"Primary": "1.1.1.1",
"Secondary": "1.0.0.1"
}
}
}
#>

# Modify the variables and run his code. It will import the current file and add your addition. From there you can create a pull request.
Expand Down
18 changes: 9 additions & 9 deletions config/tweaks.json
Original file line number Diff line number Diff line change
Expand Up @@ -1853,7 +1853,7 @@
$preferences.Preferences[28] = 0
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\TaskManager\" -Name \"Preferences\" -Type Binary -Value $preferences.Preferences
}
Remove-Item -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MyComputer\\NameSpace\\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}\" -Recurse -ErrorAction SilentlyContinue
Remove-Item -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MyComputer\\NameSpace\\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}\" -Recurse -ErrorAction SilentlyContinue

# Group svchost.exe processes
$ram = (Get-CimInstance -ClassName Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum).Sum / 1kb
Expand Down Expand Up @@ -2089,26 +2089,26 @@
"
$TeamsPath = [System.IO.Path]::Combine($env:LOCALAPPDATA, 'Microsoft', 'Teams')
$TeamsUpdateExePath = [System.IO.Path]::Combine($TeamsPath, 'Update.exe')

Write-Host \"Stopping Teams process...\"
Stop-Process -Name \"*teams*\" -Force -ErrorAction SilentlyContinue

Write-Host \"Uninstalling Teams from AppData\\Microsoft\\Teams\"
if ([System.IO.File]::Exists($TeamsUpdateExePath)) {
# Uninstall app
$proc = Start-Process $TeamsUpdateExePath \"-uninstall -s\" -PassThru
$proc.WaitForExit()
}

Write-Host \"Removing Teams AppxPackage...\"
Get-AppxPackage \"*Teams*\" | Remove-AppxPackage -ErrorAction SilentlyContinue
Get-AppxPackage \"*Teams*\" -AllUsers | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue

Write-Host \"Deleting Teams directory\"
if ([System.IO.Directory]::Exists($TeamsPath)) {
Remove-Item $TeamsPath -Force -Recurse -ErrorAction SilentlyContinue
}

Write-Host \"Deleting Teams uninstall registry key\"
# Uninstall from Uninstall registry key UninstallString
$us = (Get-ChildItem -Path HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall, HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall | Get-ItemProperty | Where-Object { $_.DisplayName -like '*Teams*'}).UninstallString
Expand All @@ -2133,7 +2133,7 @@
"WPFEssTweaksStorage": {
"InvokeScript": [
"Remove-Item -Path \"HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy\" -Recurse -ErrorAction SilentlyContinue"
],
],
"UndoScript": [
"New-Item -Path \"HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy\" | Out-Null
"
Expand Down Expand Up @@ -2163,7 +2163,7 @@
},
"WPFEssTweaksRemoveEdge": {
"InvokeScript": [
"
"
#:: Standalone script by AveYo Source: https://raw.githubusercontent.com/AveYo/fox/main/Edge_Removal.bat

curl.exe -s \"https://raw.githubusercontent.com/AveYo/fox/main/Edge_Removal.bat\" -o $ENV:temp\\edgeremoval.bat
Expand All @@ -2181,7 +2181,7 @@
"WPFEssTweaksRemoveOnedrive": {
"InvokeScript": [
"

Write-Host \"Kill OneDrive process\"
taskkill.exe /F /IM \"OneDrive.exe\"
taskkill.exe /F /IM \"explorer.exe\"
Expand Down
8 changes: 4 additions & 4 deletions functions/private/Get-WinUtilCheckBoxes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ Function Get-WinUtilCheckBoxes {
if ($uncheck -eq $true){
$CheckBox.value.ischecked = $false
}

}
}
}

if($Group -eq "WPFTweaks"){
$filter = Get-WinUtilVariables -Type Checkbox | Where-Object {$psitem -like "WPF*Tweaks*"}
$CheckBoxes = $sync.GetEnumerator() | Where-Object {$psitem.Key -in $filter}
Foreach ($CheckBox in $CheckBoxes){
if($CheckBox.value.ischecked -eq $true){
$Output.Add($Checkbox.Name)

if ($uncheck -eq $true){
$CheckBox.value.ischecked = $false
}
Expand All @@ -63,7 +63,7 @@ Function Get-WinUtilCheckBoxes {
Foreach ($CheckBox in $CheckBoxes){
if($CheckBox.value.ischecked -eq $true){
$Output.Add($Checkbox.Name)

if ($uncheck -eq $true){
$CheckBox.value.ischecked = $false
}
Expand Down
4 changes: 2 additions & 2 deletions functions/private/Get-WinUtilRegistry.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ function Get-WinUtilRegistry {
.EXAMPLE
Get-WinUtilRegistry -Name "PublishUserActivities" -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Type "DWord" -Value "0"
#>
#>
param (
$Name,
$Path,
$Type,
$Value
)

Try{
Try{
$syscheckvalue = Get-ItemPropertyValue -Path $Path -Value $Value # Return Value

}
Expand Down
4 changes: 2 additions & 2 deletions functions/private/Get-WinUtilToggleStatus.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Function Get-WinUtilToggleStatus {
$system = (Get-ItemProperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize').SystemUsesLightTheme
if($app -eq 0 -and $system -eq 0){
return $true
}
}
else{
return $false
}
Expand All @@ -27,7 +27,7 @@ Function Get-WinUtilToggleStatus {
$bingsearch = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Search').BingSearchEnabled
if($bingsearch -eq 0){
return $false
}
}
else{
return $true
}
Expand Down
4 changes: 2 additions & 2 deletions functions/private/Get-WinUtilVariables.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function Get-WinUtilVariables {
[string]$Type
)

$keys = $sync.keys | Where-Object {$psitem -like "WPF*"}
$keys = $sync.keys | Where-Object {$psitem -like "WPF*"}

if($type){
$output = $keys | ForEach-Object {
Expand All @@ -26,7 +26,7 @@ function Get-WinUtilVariables {
}
Catch{<#I am here so errors don't get outputted for a couple variables that don't have the .GetType() attribute#>}
}
return $output
return $output
}
return $keys
}
2 changes: 1 addition & 1 deletion functions/private/Install-WinUtilChoco.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function Install-WinUtilChoco {
Write-Host "Chocolatey Already Installed"
return
}

Write-Host "Seems Chocolatey is not installed, installing now?"
# Let user decide if they want to install Chocolatey
$confirmation = Read-Host "Are you Sure You Want To Proceed:(y/n)"
Expand Down
4 changes: 2 additions & 2 deletions functions/private/Install-WinUtilProgramWinget.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ Function Install-WinUtilProgramWinget {
Write-Progress -Activity "$manage Applications" -Status "Starting" -PercentComplete 0

Foreach ($Program in $($ProgramsToInstall -split ",")){

Write-Progress -Activity "$manage Applications" -Status "$manage $Program $($x + 1) of $count" -PercentComplete $($x/$count*100)
if($manage -eq "Installing"){
Start-Process -FilePath winget -ArgumentList "install -e --accept-source-agreements --accept-package-agreements --silent $Program" -NoNewWindow -Wait
}
if($manage -eq "Uninstalling"){
Start-Process -FilePath winget -ArgumentList "uninstall -e --purge --force --silent $Program" -NoNewWindow -Wait
}

$X++
}

Expand Down
6 changes: 3 additions & 3 deletions functions/private/Install-WinUtilWinget.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
function Get-LatestHash {
$shaUrl = ((Invoke-WebRequest $apiLatestUrl -UseBasicParsing | ConvertFrom-Json).assets | Where-Object { $_.name -match '^Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.txt$' }).browser_download_url

$shaFile = Join-Path -Path $tempFolder -ChildPath 'Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.txt'
$WebClient.DownloadFile($shaUrl, $shaFile)

Get-Content $shaFile
}

Expand Down Expand Up @@ -39,7 +39,7 @@ function Install-WinUtilWinget {

Write-Host "Running Alternative Installer and Direct Installing"
Start-Process -Verb runas -FilePath powershell.exe -ArgumentList "irm https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/winget.ps1 | iex"

Write-Host "Winget Installed"
}
Catch{
Expand Down
Loading

0 comments on commit 3585892

Please sign in to comment.