Skip to content

Commit

Permalink
Trim Trailing Whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Carterpersall committed Oct 4, 2023
1 parent 807b0fb commit 0ce32aa
Show file tree
Hide file tree
Showing 57 changed files with 236 additions and 236 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 @@ -32,18 +32,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 @@ -57,7 +57,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-WinUtilInstallerProcess.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
function Get-WinUtilInstallerProcess {
<#
.DESCRIPTION
Meant to check for running processes and will return a boolean response
#>

param($Process)
Expand Down
8 changes: 4 additions & 4 deletions functions/private/Get-WinUtilRegistry.ps1
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
function Get-WinUtilRegistry {
<#
.DESCRIPTION
This function will make all modifications to the registry
.EXAMPLE
Set-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
8 changes: 4 additions & 4 deletions functions/private/Get-WinUtilToggleStatus.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Function Get-WinUtilToggleStatus {
<#
.DESCRIPTION
Meant to pull the registry keys for a toggle switch and returns true or false
True should mean status is enabled
False should mean status is disabled
#>

Param($ToggleSwitch)
Expand All @@ -15,7 +15,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 @@ -24,7 +24,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
8 changes: 4 additions & 4 deletions functions/private/Get-WinUtilVariables.ps1
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
function Get-WinUtilVariables {

<#
.DESCRIPTION
placeholder
#>
param (
[Parameter()]
[ValidateSet("CheckBox", "Button")]
[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 @@ -23,7 +23,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
}
Loading

0 comments on commit 0ce32aa

Please sign in to comment.