(#63) Added Mouse natural scroll option to GUI

- Refactored Write-TitleCounter function
- Updated README about MS Edge and Mouse Natural
main
Plínio Larrubia 2 years ago committed by Plínio Larrubia
parent 6ebd7704e6
commit 956fcedb10
No known key found for this signature in database
GPG Key ID: 057B0A87CB137C69

@ -137,11 +137,12 @@ Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force; ls -Recurse *.ps*1 |
#### System Debloat Tools
- `Apply Tweaks`: Run every Common Tweak scripts ([Go To **☑️ Common Script Features** section](#☑️-common-script-features));
- `Apply Tweaks`: Run every Common Tweak scripts ([Go To **☑️ Common Script Features** section](#%EF%B8%8F-common-script-features));
- `Undo Tweaks`: Re-apply some tweaks and _Revert_ all possible ones, covering the `Scheduled Tasks`, `Services`, `Privacy and Performance`, `Personal` and `Optional Features` tweaks, then try to `Reinstall Pre-Installed Apps`;
- [`Remove Microsoft Edge`](./src/scripts/remove-msedge.ps1): uninstalls Microsoft Edge/WebView, then remove the remaining files;
- [`Remove OneDrive`](./src/scripts/remove-onedrive.ps1): completely removes OneDrive from the System, re-install is possible via Win Store;
- [`Remove Xbox`](./src/scripts/remove-xbox.ps1): Wipe Xbox Apps, disable Services related to Xbox and GameBar/GameDVR;
- [`Install OneDrive`](./src/utils/install-onedrive.ps1): Tries to re-install the built-in OneDrive;
- [`Remove Xbox`](./src/scripts/remove-xbox.ps1): wipe Xbox Apps, disable Services related to Xbox and GameBar/GameDVR;
- [`Install OneDrive`](./src/utils/install-onedrive.ps1): tries to re-install the built-in OneDrive;
#### Install System Apps ([Can be found here](src/utils/install-individual-system-apps.psm1))
@ -186,6 +187,7 @@ _This section can manually adjust `Optional Features` from the system, working a
- `Enable/Disable Encrypted DNS`: Sets the DNS Client Servers to **Cloudflare's** and **Google's** (ipv4 and ipv6), and enables **DNS Over HTTPS** on _Windows 11_.
- `Enable/Disable God Mode`: Manages the hidden Desktop folder called "**God Mode**";
- `Enable/Disable Mouse Natural Scroll`: Sets the mac-like mouse scrolling behavior, basically reverts mouse scroll direction;
- `Enable/Disable Take Ownership menu`: [_Enables_](./src/utils/enable-take-ownership-context-menu.reg) or [_Disables_](src/utils/disable-take-ownership-context-menu.reg) the **Take Ownership context menu**;
- `Enable/Disable Shutdown PC shortcut`: Manages the **Shutdown Computer desktop shortcut**;

@ -180,7 +180,8 @@ function Show-GUI() {
$ClMiscFeatures = New-Label -Text "Miscellaneous Features" -Width $PanelWidth -Height $CaptionLabelHeight -LocationX 0 -ElementBefore $CbWindowsMediaPlayer
$CbEncryptedDNS = New-CheckBox -Text "Enable Encrypted DNS" -Width $PanelElementWidth -Height $CheckBoxHeight -LocationX $PanelElementX -ElementBefore $ClMiscFeatures
$CbGodMode = New-CheckBox -Text "Enable God Mode" -Width $PanelElementWidth -Height $CheckBoxHeight -LocationX $PanelElementX -ElementBefore $CbEncryptedDNS
$CbTakeOwnership = New-CheckBox -Text "Enable Take Ownership menu" -Width $PanelElementWidth -Height $CheckBoxHeight -LocationX $PanelElementX -ElementBefore $CbGodMode
$CbMouseNaturalScroll = New-CheckBox -Text "Enable Mouse Natural Scroll" -Width $PanelElementWidth -Height $CheckBoxHeight -LocationX $PanelElementX -ElementBefore $CbGodMode
$CbTakeOwnership = New-CheckBox -Text "Enable Take Ownership menu" -Width $PanelElementWidth -Height $CheckBoxHeight -LocationX $PanelElementX -ElementBefore $CbMouseNaturalScroll
$CbFastShutdownPCShortcut = New-CheckBox -Text "Enable Fast Shutdown shortcut" -Width $PanelElementWidth -Height $CheckBoxHeight -LocationX $PanelElementX -ElementBefore $CbTakeOwnership
# ==> Tab 2
@ -400,7 +401,7 @@ function Show-GUI() {
$T1Panel1.Controls.AddRange(@($ClOtherTools, $RandomizeSystemColor, $ReinstallBloatApps, $RepairWindows, $ShowDebloatInfo))
$T1Panel2.Controls.AddRange(@($ClCustomizeFeatures, $CbDarkTheme, $CbActivityHistory, $CbBackgroundsApps, $CbClipboardHistory, $CbCortana, $CbOldVolumeControl, $CbOnlineSpeechRecognition, $CbPhotoViewer, $CbSearchAppForUnknownExt, $CbTelemetry, $CbWSearchService, $CbXboxGameBarDVR))
$T1Panel2.Controls.AddRange(@($ClOptionalFeatures, $CbPrintToPDFServices, $CbPrintingXPSServices, $CbWindowsMediaPlayer))
$T1Panel2.Controls.AddRange(@($ClMiscFeatures, $CbEncryptedDNS, $CbGodMode, $CbTakeOwnership, $CbFastShutdownPCShortcut))
$T1Panel2.Controls.AddRange(@($ClMiscFeatures, $CbEncryptedDNS, $CbGodMode, $CbMouseNaturalScroll, $CbTakeOwnership, $CbFastShutdownPCShortcut))
$T2Panel1.Controls.AddRange(@($UpgradeAll))
$T2Panel1.Controls.AddRange(@($ClCpuGpuDrivers, $InstallAmdRyzenChipsetDriver, $InstallIntelDSA, $InstallNvidiaGeForceExperience, $InstallNVCleanstall))
@ -708,6 +709,16 @@ function Show-GUI() {
}
})
$CbMouseNaturalScroll.Add_Click( {
If ($CbMouseNaturalScroll.CheckState -eq "Checked") {
Enable-MouseNaturalScroll
$CbMouseNaturalScroll.Text = "[ON] Mouse Natural Scroll"
} Else {
Disable-MouseNaturalScroll
$CbMouseNaturalScroll.Text = "[OFF] Mouse Natural Scroll *"
}
})
$CbTakeOwnership.Add_Click( {
If ($CbTakeOwnership.CheckState -eq "Checked") {
Open-RegFilesCollection -RelativeLocation "src\utils" -Scripts @("enable-take-ownership-context-menu.reg") -NoDialog

@ -63,9 +63,7 @@ function Write-TitleCounter() {
)
$Counter += 1
Write-Host "`n<•••••••••••••••••••••••••••••••••••••••••••••••••••••••>" -ForegroundColor Blue -BackgroundColor Black
Write-Host " ($Counter/$MaxLength) $Text" -ForegroundColor White -BackgroundColor Black
Write-Host "<•••••••••••••••••••••••••••••••••••••••••••••••••••••••>" -ForegroundColor Blue -BackgroundColor Black
Write-Title -Text "($Counter/$MaxLength) $Text"
return $Counter
}

@ -156,6 +156,21 @@ function Enable-GodMode() {
New-Item -Path "$DesktopPath\GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}" -ItemType Directory -Force
}
# Code from: https://answers.microsoft.com/en-us/windows/forum/all/set-the-mouse-scroll-direction-to-reverse-natural/ede4ccc4-3846-4184-a86d-a028515040c0
function Disable-MouseNaturalScroll() {
Get-PnpDevice -Class Mouse -PresentOnly -Status OK | ForEach-Object {
Write-Status -Types "*" -Status "Disabling mouse natural mode on $($_.Name): $($_.DeviceID) (needs restart!)"
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters" -Name "FlipFlopWheel" -Type DWord -Value 0
}
}
function Enable-MouseNaturalScroll() {
Get-PnpDevice -Class Mouse -PresentOnly -Status OK | ForEach-Object {
Write-Status -Types "+" -Status "Enabling mouse natural mode on $($_.Name): $($_.DeviceID) (needs restart!)"
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters" -Name "FlipFlopWheel" -Type DWord -Value 1
}
}
function Disable-OldVolumeControl() {
Write-Status -Types "*", "Misc" -Status "Disabling Old Volume Control..."
Remove-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\MTCUVC" -Name "EnableMtcUvc"
@ -288,4 +303,4 @@ function Enable-XboxGameBarDVR() {
New-Item -Path "$PathToLMPoliciesGameDVR" -Force | Out-Null
}
Remove-ItemProperty -Path "$PathToLMPoliciesGameDVR" -Name "AllowGameDVR"
}
}
Loading…
Cancel
Save