From 9b03b944351230812a8128696791557ef41a265e Mon Sep 17 00:00:00 2001 From: "Sean (ANGRYxScotsman)" <36518683+seanh1995@users.noreply.github.com> Date: Thu, 12 Feb 2026 20:33:11 +0000 Subject: [PATCH] more winutil website update and new features (#4030) * updated theme to the latest version * Update en.yaml * removed all the order from the docs * add the store link * update homepage * add filename and line number to all the code blocks and also removed pages * auto pull the code from the json files * Merge branch 'main' into winutil-new-features * the script updated linenostart= * Delete LaptopHibernation.md --- .github/workflows/docs.yaml | 8 + config/feature.json | 13 +- config/tweaks.json | 77 +- docs/content/_index.md | 2 +- docs/content/dev/architecture.md | 9 +- .../Features/DisableLegacyRecovery.md | 4 +- .../features/Features/EnableLegacyRecovery.md | 2 +- .../dev/features/Features/RegBackup.md | 4 +- docs/content/dev/features/Features/Sandbox.md | 4 +- docs/content/dev/features/Features/dotnet.md | 5 +- docs/content/dev/features/Features/hyperv.md | 4 +- .../dev/features/Features/legacymedia.md | 5 +- docs/content/dev/features/Features/nfs.md | 4 +- docs/content/dev/features/Features/wsl.md | 5 +- docs/content/dev/features/Fixes/Autologin.md | 2 +- .../Fixes/{CorruptionScan.md => DISM.md} | 2 +- docs/content/dev/features/Fixes/Network.md | 2 +- .../features/Fixes/RunAdobeCCCleanerTool.md | 2 +- docs/content/dev/features/Fixes/Update.md | 3 +- docs/content/dev/features/Fixes/Winget.md | 2 +- .../Legacy-Windows-Panels/Computer.md | 32 + .../features/Legacy-Windows-Panels/Restore.md | 32 + .../{user.md => Timedate.md} | 4 +- .../features/Legacy-Windows-Panels/control.md | 2 +- .../features/Legacy-Windows-Panels/network.md | 2 +- .../features/Legacy-Windows-Panels/power.md | 2 +- .../features/Legacy-Windows-Panels/printer.md | 4 +- .../features/Legacy-Windows-Panels/region.md | 2 +- .../features/Legacy-Windows-Panels/sound.md | 2 +- .../features/Legacy-Windows-Panels/system.md | 2 +- .../Customize-Preferences/BingSearch.md | 6 +- .../tweaks/Customize-Preferences/DarkMode.md | 6 +- .../Customize-Preferences/DetailedBSoD.md | 6 +- ...Widgets.md => DisableCrossDeviceResume.md} | 16 +- .../Customize-Preferences/HiddenFiles.md | 6 +- .../{SnapFlyout.md => HideSettingsHome.md} | 34 +- .../MouseAcceleration.md | 6 +- .../MultiplaneOverlay.md | 28 + .../Customize-Preferences/NewOutlook.md | 52 ++ .../tweaks/Customize-Preferences/NumLock.md | 6 +- .../{SnapWindow.md => S3Sleep.md} | 24 +- .../tweaks/Customize-Preferences/ShowExt.md | 6 +- .../Customize-Preferences/SnapSuggestion.md | 38 - .../StartMenuRecommendations.md | 54 ++ .../Customize-Preferences/StickyKeys.md | 6 +- .../tweaks/Customize-Preferences/TaskView.md | 6 +- .../Customize-Preferences/TaskbarAlignment.md | 6 +- .../Customize-Preferences/TaskbarSearch.md | 6 +- .../Customize-Preferences/VerboseLogon.md | 6 +- .../dev/tweaks/Essential-Tweaks/Activity.md | 6 +- .../Essential-Tweaks/ConsumerFeatures.md | 4 +- .../Essential-Tweaks/DeleteTempFiles.md | 3 +- .../DisableExplorerAutoDiscovery.md | 59 ++ .../tweaks/Essential-Tweaks/DiskCleanup.md | 3 +- .../Essential-Tweaks/EndTaskOnTaskbar.md | 4 +- .../dev/tweaks/Essential-Tweaks/GameDVR.md | 54 -- .../{Hibernation.md => Hiber.md} | 6 +- .../dev/tweaks/Essential-Tweaks/Location.md | 6 +- .../Essential-Tweaks/Powershell7Tele.md | 5 +- .../tweaks/Essential-Tweaks/RestorePoint.md | 11 +- .../dev/tweaks/Essential-Tweaks/Services.md | 11 +- .../dev/tweaks/Essential-Tweaks/Telemetry.md | 5 +- .../dev/tweaks/Essential-Tweaks/WPBT.md | 4 +- .../dev/tweaks/Essential-Tweaks/Widget.md | 4 +- .../tweaks/Performance-Plans/AddUltPerf.md | 90 ++ .../{Profile.md => RemoveUltPerf.md} | 2 +- .../BlockAdobeNet.md | 16 +- .../BraveDebloat.md | 14 +- .../z--Advanced-Tweaks---CAUTION/DeBloat.md | 3 +- .../DisableBGapps.md | 6 +- .../DisableFSO.md | 6 +- .../DisableIPv6.md | 6 +- .../DisableNotifications.md | 6 +- .../z--Advanced-Tweaks---CAUTION/Display.md | 13 +- .../EdgeDebloat.md | 17 +- .../IPv46.md | 6 +- .../OOSUbutton.md | 7 +- .../RazerBlock.md | 4 +- .../RemoveCopilot.md | 95 ++ .../RemoveEdge.md | 14 +- .../RemoveGallery.md | 10 +- .../RemoveHome.md | 12 +- .../RemoveOneDrive.md | 4 +- .../RightClickMenu.md | 12 +- .../Storage.md | 6 +- .../z--Advanced-Tweaks---CAUTION/Teredo.md | 12 +- .../z--Advanced-Tweaks---CAUTION/UTC.md | 8 +- .../XboxRemoval.md | 4 +- .../z--Advanced-Tweaks---CAUTION/changedns.md | 12 + docs/go.mod | 2 +- docs/go.sum | 2 + docs/hugo.toml | 9 +- docs/i18n/en.yaml | 2 +- tools/devdocs-generator.ps1 | 863 ++++++------------ 94 files changed, 1046 insertions(+), 963 deletions(-) rename docs/content/dev/features/Fixes/{CorruptionScan.md => DISM.md} (98%) create mode 100644 docs/content/dev/features/Legacy-Windows-Panels/Computer.md create mode 100644 docs/content/dev/features/Legacy-Windows-Panels/Restore.md rename docs/content/dev/features/Legacy-Windows-Panels/{user.md => Timedate.md} (85%) rename docs/content/dev/tweaks/Customize-Preferences/{TaskbarWidgets.md => DisableCrossDeviceResume.md} (62%) rename docs/content/dev/tweaks/Customize-Preferences/{SnapFlyout.md => HideSettingsHome.md} (50%) create mode 100644 docs/content/dev/tweaks/Customize-Preferences/MultiplaneOverlay.md create mode 100644 docs/content/dev/tweaks/Customize-Preferences/NewOutlook.md rename docs/content/dev/tweaks/Customize-Preferences/{SnapWindow.md => S3Sleep.md} (55%) delete mode 100644 docs/content/dev/tweaks/Customize-Preferences/SnapSuggestion.md create mode 100644 docs/content/dev/tweaks/Customize-Preferences/StartMenuRecommendations.md create mode 100644 docs/content/dev/tweaks/Essential-Tweaks/DisableExplorerAutoDiscovery.md delete mode 100644 docs/content/dev/tweaks/Essential-Tweaks/GameDVR.md rename docs/content/dev/tweaks/Essential-Tweaks/{Hibernation.md => Hiber.md} (93%) create mode 100644 docs/content/dev/tweaks/Performance-Plans/AddUltPerf.md rename docs/content/dev/tweaks/Performance-Plans/{Profile.md => RemoveUltPerf.md} (97%) rename docs/content/dev/tweaks/{Essential-Tweaks => z--Advanced-Tweaks---CAUTION}/IPv46.md (90%) create mode 100644 docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveCopilot.md rename docs/content/dev/tweaks/{Essential-Tweaks => z--Advanced-Tweaks---CAUTION}/Storage.md (89%) create mode 100644 docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/changedns.md diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 63fb5da1..8e212ed9 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -6,6 +6,9 @@ on: - main paths: - "docs/**" + - "config/tweaks.json" + - "config/feature.json" + - "functions/**" workflow_dispatch: permissions: @@ -42,6 +45,11 @@ jobs: - name: Setup Pages id: pages uses: actions/configure-pages@v5 + - name: Generate Dev Docs from JSON + shell: pwsh + run: | + Set-Location tools + ./devdocs-generator.ps1 - name: Install Node.js dependencies run: "cd docs && [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" - name: Cache Restore diff --git a/config/feature.json b/config/feature.json index 5a682514..18087b77 100644 --- a/config/feature.json +++ b/config/feature.json @@ -112,7 +112,7 @@ "Order": "a019_", "feature": [], "InvokeScript": [ - "bcdedit /set bootmenupolicy standard" + "bcdedit /set bootmenupolicy standard" ], "link": "https://winutil.christitus.com/dev/features/features/disablelegacyrecovery" }, @@ -252,7 +252,7 @@ "panel": "2", "Type": "Button", "ButtonWidth": "300", - "link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/user" + "link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/sound" }, "WPFPanelSystem": { "Content": "System Properties", @@ -276,7 +276,8 @@ "panel": "2", "Order": "a083_", "Type": "Button", - "ButtonWidth": "300" + "ButtonWidth": "300", + "link": "https://winutil.christitus.com/dev/features/powershell-profile-powershell-7--only/installpsprofile" }, "WPFWinUtilUninstallPSProfile": { "Content": "Uninstall CTT PowerShell Profile", @@ -284,7 +285,8 @@ "panel": "2", "Order": "a084_", "Type": "Button", - "ButtonWidth": "300" + "ButtonWidth": "300", + "link": "https://winutil.christitus.com/dev/features/powershell-profile-powershell-7--only/uninstallpsprofile" }, "WPFWinUtilSSHServer": { "Content": "Enable OpenSSH Server", @@ -292,6 +294,7 @@ "panel": "2", "Order": "a084_", "Type": "Button", - "ButtonWidth": "300" + "ButtonWidth": "300", + "link": "https://winutil.christitus.com/dev/features/remote-access/sshserver" } } diff --git a/config/tweaks.json b/config/tweaks.json index 45331bd1..806c5204 100644 --- a/config/tweaks.json +++ b/config/tweaks.json @@ -56,7 +56,7 @@ "UndoScript": [ "powercfg.exe /hibernate on" ], - "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/hibernation" + "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/hiber" }, "WPFTweaksWidget": { "Content": "Remove Widgets", @@ -80,7 +80,55 @@ Invoke-WinUtilExplorerUpdate -action \"restart\" " ], - "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/widgets" + "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/widget" + }, + "WPFTweaksLaptopHibernation": { + "Content": "Set Hibernation as default (good for laptops)", + "Description": "Most modern laptops have connected standby enabled which drains the battery, this sets hibernation as default which will not drain the battery. See issue https://github.com/ChrisTitusTech/winutil/issues/1399", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "Order": "a030_", + "registry": [ + { + "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Power\\PowerSettings\\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0", + "OriginalValue": "1", + "Name": "Attributes", + "Value": "2", + "Type": "DWord" + }, + { + "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Power\\PowerSettings\\abfc2519-3608-4c2a-94ea-171b0ed546ab\\94ac6d29-73ce-41a6-809f-6363ba21b47e", + "OriginalValue": "0", + "Name": "Attributes ", + "Value": "2", + "Type": "DWord" + } + ], + "InvokeScript": [ + " + Write-Host \"Turn on Hibernation\" + powercfg.exe /hibernate on + + # Set hibernation as the default action + powercfg.exe change standby-timeout-ac 60 + powercfg.exe change standby-timeout-dc 60 + powercfg.exe change monitor-timeout-ac 10 + powercfg.exe change monitor-timeout-dc 1 + " + ], + "UndoScript": [ + " + Write-Host \"Turn off Hibernation\" + powercfg.exe /hibernate off + + # Set standby to default values + powercfg.exe change standby-timeout-ac 15 + powercfg.exe change standby-timeout-dc 15 + powercfg.exe change monitor-timeout-ac 15 + powercfg.exe change monitor-timeout-dc 15 + " + ], + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/laptophibernation" }, "WPFTweaksLocation": { "Content": "Disable Location Tracking", @@ -1090,7 +1138,7 @@ "panel": "1", "registry": [ { - "Path":"HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave", + "Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave", "Name": "BraveRewardsDisabled", "Type": "DWord", "Value": "1", @@ -1125,7 +1173,7 @@ "OriginalValue": "" } ], - "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/bravedebloat/" + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/bravedebloat" }, "WPFTweaksEdgeDebloat": { "Content": "Edge Debloat", @@ -1763,7 +1811,7 @@ "OriginalValue": "1" } ], - "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/storage" + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/storage" }, "WPFTweaksRemoveCopilot": { "Content": "Disable Microsoft Copilot", @@ -2023,7 +2071,7 @@ "Type": "DWord" } ], - "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/ipv46" + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/ipv46" }, "WPFTweaksTeredo": { "Content": "Disable Teredo", @@ -2247,7 +2295,7 @@ Invoke-WinUtilExplorerUpdate -action \"restart\" " ], - "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/wpftogglestartmenurecommendations" + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/startmenurecommendations" }, "WPFToggleHideSettingsHome": { "Content": "Remove Settings Home Page", @@ -2264,7 +2312,8 @@ "OriginalValue": "show:home", "DefaultState": "false" } - ] + ], + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/hidesettingshome" }, "WPFToggleMouseAcceleration": { "Content": "Mouse Acceleration", @@ -2360,7 +2409,6 @@ ], "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/newoutlook" }, - "WPFToggleMultiplaneOverlay": { "Content": "Disable Multiplane Overlay", "Description": "Disable the Multiplane Overlay which can sometimes cause issues with Graphics Cards.", @@ -2377,7 +2425,7 @@ "Type": "DWord" } ], - "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/multplaneoverlay" + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/multiplaneoverlay" }, "WPFToggleHiddenFiles": { "Content": "Show Hidden Files", @@ -2530,7 +2578,8 @@ "DefaultState": "false", "Type": "DWord" } - ] + ], + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/s3sleep" }, "WPFOOSUbutton": { "Content": "Run OO Shutup 10", @@ -2615,7 +2664,8 @@ Write-Host Please sign out and back in, or restart your computer to apply the changes! " - ] + ], + "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/disableexplorerautodiscovery" }, "WPFToggleDisableCrossDeviceResume": { "Content": "Cross-Device Resume", @@ -2632,6 +2682,7 @@ "DefaultState": "true", "Type": "DWord" } - ] + ], + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/disablecrossdeviceresume" } } diff --git a/docs/content/_index.md b/docs/content/_index.md index 106f3817..02830c71 100644 --- a/docs/content/_index.md +++ b/docs/content/_index.md @@ -22,5 +22,5 @@ irm "https://christitus.com/win" | iex ``` -> [!NOTE] +> [!IMPORTANT] > Winutil is updated frequently as of the time of writing. Consequently, features and functionalities may evolve, and the documentation may not always reflect the most current images or information. diff --git a/docs/content/dev/architecture.md b/docs/content/dev/architecture.md index 2dc6bd35..f3345ce4 100644 --- a/docs/content/dev/architecture.md +++ b/docs/content/dev/architecture.md @@ -194,7 +194,7 @@ Update UI ### applications.json Structure -```json +```json {filename="config/applications.json"} { "WPFInstall": { "category": "Browsers", @@ -217,14 +217,13 @@ Update UI ### tweaks.json Structure -```json +```json {filename="config/tweaks.json"} { "WPFTweaksTelemetry": { "Content": "Disable Telemetry", "Description": "Disables Microsoft Telemetry", "category": "Essential Tweaks", "panel": "1", - "Order": "a003_", "registry": [ { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\DataCollection", @@ -365,7 +364,7 @@ $sync.form.Dispatcher.Invoke([action]{ ### Adding a New Application 1. Edit `config/applications.json`: -```json +```json {filename="config/applications.json"} { "WPFInstallNewApp": { "category": "Utilities", @@ -383,7 +382,7 @@ $sync.form.Dispatcher.Invoke([action]{ ### Adding a New Tweak 1. Edit `config/tweaks.json`: -```json +```json {filename="config/tweaks.json"} { "WPFTweaksNewTweak": { "Content": "New Tweak", diff --git a/docs/content/dev/features/Features/DisableLegacyRecovery.md b/docs/content/dev/features/Features/DisableLegacyRecovery.md index 554dbcd5..b2a383ad 100644 --- a/docs/content/dev/features/Features/DisableLegacyRecovery.md +++ b/docs/content/dev/features/Features/DisableLegacyRecovery.md @@ -2,7 +2,7 @@ title: "Disable Legacy F8 Boot Recovery" description: "" --- -```json +```json {filename="config/feature.json",linenos=inline,linenostart=107} "WPFFeatureDisableLegacyRecovery": { "Content": "Disable Legacy F8 Boot Recovery", "Description": "Disables Advanced Boot Options screen that lets you start Windows in advanced troubleshooting modes.", @@ -11,6 +11,6 @@ description: "" "Order": "a019_", "feature": [], "InvokeScript": [ - "bcdedit /set bootmenupolicy standard" + "bcdedit /set bootmenupolicy standard" ], ``` diff --git a/docs/content/dev/features/Features/EnableLegacyRecovery.md b/docs/content/dev/features/Features/EnableLegacyRecovery.md index e613ae53..bcf22430 100644 --- a/docs/content/dev/features/Features/EnableLegacyRecovery.md +++ b/docs/content/dev/features/Features/EnableLegacyRecovery.md @@ -2,7 +2,7 @@ title: "Enable Legacy F8 Boot Recovery" description: "" --- -```json +```json {filename="config/feature.json",linenos=inline,linenostart=95} "WPFFeatureEnableLegacyRecovery": { "Content": "Enable Legacy F8 Boot Recovery", "Description": "Enables Advanced Boot Options screen that lets you start Windows in advanced troubleshooting modes.", diff --git a/docs/content/dev/features/Features/RegBackup.md b/docs/content/dev/features/Features/RegBackup.md index dee57d31..948314c7 100644 --- a/docs/content/dev/features/Features/RegBackup.md +++ b/docs/content/dev/features/Features/RegBackup.md @@ -2,8 +2,8 @@ title: "Enable Daily Registry Backup Task 12.30am" description: "" --- -```json -"WPFFeatureRegBackup": { +```json {filename="config/feature.json",linenos=inline,linenostart=77} + "WPFFeatureRegBackup": { "Content": "Enable Daily Registry Backup Task 12.30am", "Description": "Enables daily registry backup, previously disabled by Microsoft in Windows 10 1803.", "category": "Features", diff --git a/docs/content/dev/features/Features/Sandbox.md b/docs/content/dev/features/Features/Sandbox.md index e1b89b4b..3e142293 100644 --- a/docs/content/dev/features/Features/Sandbox.md +++ b/docs/content/dev/features/Features/Sandbox.md @@ -2,8 +2,8 @@ title: "Windows Sandbox" description: "" --- -```json -"WPFFeaturesSandbox": { +```json {filename="config/feature.json",linenos=inline,linenostart=119} + "WPFFeaturesSandbox": { "Content": "Windows Sandbox", "Description": "Windows Sandbox is a lightweight virtual machine that provides a temporary desktop environment to safely run applications and programs in isolation.", "category": "Features", diff --git a/docs/content/dev/features/Features/dotnet.md b/docs/content/dev/features/Features/dotnet.md index d8d365f3..9bc9d8bf 100644 --- a/docs/content/dev/features/Features/dotnet.md +++ b/docs/content/dev/features/Features/dotnet.md @@ -2,8 +2,8 @@ title: "All .Net Framework (2,3,4)" description: "" --- -```json -"WPFFeaturesdotnet": { +```json {filename="config/feature.json",linenos=inline,linenostart=2} + "WPFFeaturesdotnet": { "Content": "All .Net Framework (2,3,4)", "Description": ".NET and .NET Framework is a developer platform made up of tools, programming languages, and libraries for building many different types of applications.", "category": "Features", @@ -13,4 +13,5 @@ description: "" "NetFx4-AdvSrvs", "NetFx3" ], + "InvokeScript": [], ``` diff --git a/docs/content/dev/features/Features/hyperv.md b/docs/content/dev/features/Features/hyperv.md index 8e81b59e..0f44fe6a 100644 --- a/docs/content/dev/features/Features/hyperv.md +++ b/docs/content/dev/features/Features/hyperv.md @@ -2,8 +2,8 @@ title: "HyperV Virtualization" description: "" --- -```json -"WPFFeatureshyperv": { +```json {filename="config/feature.json",linenos=inline,linenostart=15} + "WPFFeatureshyperv": { "Content": "HyperV Virtualization", "Description": "Hyper-V is a hardware virtualization product developed by Microsoft that allows users to create and manage virtual machines.", "category": "Features", diff --git a/docs/content/dev/features/Features/legacymedia.md b/docs/content/dev/features/Features/legacymedia.md index 06e0635d..ba40a44e 100644 --- a/docs/content/dev/features/Features/legacymedia.md +++ b/docs/content/dev/features/Features/legacymedia.md @@ -2,8 +2,8 @@ title: "Legacy Media (WMP, DirectPlay)" description: "" --- -```json -"WPFFeatureslegacymedia": { +```json {filename="config/feature.json",linenos=inline,linenostart=29} + "WPFFeatureslegacymedia": { "Content": "Legacy Media (WMP, DirectPlay)", "Description": "Enables legacy programs from previous versions of windows", "category": "Features", @@ -15,4 +15,5 @@ description: "" "DirectPlay", "LegacyComponents" ], + "InvokeScript": [], ``` diff --git a/docs/content/dev/features/Features/nfs.md b/docs/content/dev/features/Features/nfs.md index a8381416..6acaf1d4 100644 --- a/docs/content/dev/features/Features/nfs.md +++ b/docs/content/dev/features/Features/nfs.md @@ -2,8 +2,8 @@ title: "NFS - Network File System" description: "" --- -```json -"WPFFeaturenfs": { +```json {filename="config/feature.json",linenos=inline,linenostart=57} + "WPFFeaturenfs": { "Content": "NFS - Network File System", "Description": "Network File System (NFS) is a mechanism for storing files on a network.", "category": "Features", diff --git a/docs/content/dev/features/Features/wsl.md b/docs/content/dev/features/Features/wsl.md index c5813139..fa6f7c3f 100644 --- a/docs/content/dev/features/Features/wsl.md +++ b/docs/content/dev/features/Features/wsl.md @@ -2,8 +2,8 @@ title: "Windows Subsystem for Linux" description: "" --- -```json -"WPFFeaturewsl": { +```json {filename="config/feature.json",linenos=inline,linenostart=44} + "WPFFeaturewsl": { "Content": "Windows Subsystem for Linux", "Description": "Windows Subsystem for Linux is an optional feature of Windows that allows Linux programs to run natively on Windows without the need for a separate virtual machine or dual booting.", "category": "Features", @@ -13,4 +13,5 @@ description: "" "VirtualMachinePlatform", "Microsoft-Windows-Subsystem-Linux" ], + "InvokeScript": [], ``` diff --git a/docs/content/dev/features/Fixes/Autologin.md b/docs/content/dev/features/Fixes/Autologin.md index 9cd99a02..d2e569f9 100644 --- a/docs/content/dev/features/Fixes/Autologin.md +++ b/docs/content/dev/features/Fixes/Autologin.md @@ -2,7 +2,7 @@ title: "Set Up Autologin" description: "" --- -```powershell +```powershell {filename="functions/public/Invoke-WPFPanelAutologin.ps1",linenos=inline,linenostart=1} function Invoke-WPFPanelAutologin { <# diff --git a/docs/content/dev/features/Fixes/CorruptionScan.md b/docs/content/dev/features/Fixes/DISM.md similarity index 98% rename from docs/content/dev/features/Fixes/CorruptionScan.md rename to docs/content/dev/features/Fixes/DISM.md index 92f7c2a8..3ec84c5a 100644 --- a/docs/content/dev/features/Fixes/CorruptionScan.md +++ b/docs/content/dev/features/Fixes/DISM.md @@ -2,7 +2,7 @@ title: "System Corruption Scan" description: "" --- -```powershell +```powershell {filename="functions/public/Invoke-WPFSystemRepair.ps1",linenos=inline,linenostart=1} function Invoke-WPFSystemRepair { <# .SYNOPSIS diff --git a/docs/content/dev/features/Fixes/Network.md b/docs/content/dev/features/Fixes/Network.md index 1bb44cf0..402ecdf0 100644 --- a/docs/content/dev/features/Fixes/Network.md +++ b/docs/content/dev/features/Fixes/Network.md @@ -2,7 +2,7 @@ title: "Reset Network" description: "" --- -```powershell +```powershell {filename="functions/public/Invoke-WPFFixesNetwork.ps1",linenos=inline,linenostart=1} function Invoke-WPFFixesNetwork { <# diff --git a/docs/content/dev/features/Fixes/RunAdobeCCCleanerTool.md b/docs/content/dev/features/Fixes/RunAdobeCCCleanerTool.md index 6070d760..2a2dabb2 100644 --- a/docs/content/dev/features/Fixes/RunAdobeCCCleanerTool.md +++ b/docs/content/dev/features/Fixes/RunAdobeCCCleanerTool.md @@ -2,7 +2,7 @@ title: "Remove Adobe Creative Cloud" description: "" --- -```powershell +```powershell {filename="functions/public/Invoke-WPFRunAdobeCCCleanerTool.ps1",linenos=inline,linenostart=1} function Invoke-WPFRunAdobeCCCleanerTool { <# .SYNOPSIS diff --git a/docs/content/dev/features/Fixes/Update.md b/docs/content/dev/features/Fixes/Update.md index 4d997746..ebcb53ad 100644 --- a/docs/content/dev/features/Fixes/Update.md +++ b/docs/content/dev/features/Fixes/Update.md @@ -2,7 +2,7 @@ title: "Reset Windows Update" description: "" --- -```powershell +```powershell {filename="functions/public/Invoke-WPFFixesUpdate.ps1",linenos=inline,linenostart=1} function Invoke-WPFFixesUpdate { <# @@ -229,5 +229,4 @@ function Invoke-WPFFixesUpdate { Write-Progress -Id 9 -Activity "Starting Windows Update Services" -Completed Write-Progress -Id 10 -Activity "Forcing discovery" -Completed } - ``` diff --git a/docs/content/dev/features/Fixes/Winget.md b/docs/content/dev/features/Fixes/Winget.md index ecb59754..faed250e 100644 --- a/docs/content/dev/features/Fixes/Winget.md +++ b/docs/content/dev/features/Fixes/Winget.md @@ -2,7 +2,7 @@ title: "WinGet Reinstall" description: "" --- -```powershell +```powershell {filename="functions/public/Invoke-WPFFixesWinget.ps1",linenos=inline,linenostart=1} function Invoke-WPFFixesWinget { <# diff --git a/docs/content/dev/features/Legacy-Windows-Panels/Computer.md b/docs/content/dev/features/Legacy-Windows-Panels/Computer.md new file mode 100644 index 00000000..fcb48bc8 --- /dev/null +++ b/docs/content/dev/features/Legacy-Windows-Panels/Computer.md @@ -0,0 +1,32 @@ +--- +title: "Computer Management" +description: "" +--- +```powershell {filename="functions/public/Invoke-WPFControlPanel.ps1",linenos=inline,linenostart=1} +function Invoke-WPFControlPanel { + <# + + .SYNOPSIS + Opens the requested legacy panel + + .PARAMETER Panel + The panel to open + + #> + param($Panel) + + switch ($Panel) { + "WPFPanelControl" {control} + "WPFPanelComputer" {compmgmt.msc} + "WPFPanelNetwork" {ncpa.cpl} + "WPFPanelPower" {powercfg.cpl} + "WPFPanelPrinter" {Start-Process "shell:::{A8A91A66-3A7D-4424-8D24-04E180695C7A}"} + "WPFPanelRegion" {intl.cpl} + "WPFPanelRestore" {rstrui.exe} + "WPFPanelSound" {mmsys.cpl} + "WPFPanelSystem" {sysdm.cpl} + "WPFPanelTimedate" {timedate.cpl} + "WPFPanelUser" {control userpasswords2} + } +} +``` diff --git a/docs/content/dev/features/Legacy-Windows-Panels/Restore.md b/docs/content/dev/features/Legacy-Windows-Panels/Restore.md new file mode 100644 index 00000000..b8b1405d --- /dev/null +++ b/docs/content/dev/features/Legacy-Windows-Panels/Restore.md @@ -0,0 +1,32 @@ +--- +title: "Windows Restore" +description: "" +--- +```powershell {filename="functions/public/Invoke-WPFControlPanel.ps1",linenos=inline,linenostart=1} +function Invoke-WPFControlPanel { + <# + + .SYNOPSIS + Opens the requested legacy panel + + .PARAMETER Panel + The panel to open + + #> + param($Panel) + + switch ($Panel) { + "WPFPanelControl" {control} + "WPFPanelComputer" {compmgmt.msc} + "WPFPanelNetwork" {ncpa.cpl} + "WPFPanelPower" {powercfg.cpl} + "WPFPanelPrinter" {Start-Process "shell:::{A8A91A66-3A7D-4424-8D24-04E180695C7A}"} + "WPFPanelRegion" {intl.cpl} + "WPFPanelRestore" {rstrui.exe} + "WPFPanelSound" {mmsys.cpl} + "WPFPanelSystem" {sysdm.cpl} + "WPFPanelTimedate" {timedate.cpl} + "WPFPanelUser" {control userpasswords2} + } +} +``` diff --git a/docs/content/dev/features/Legacy-Windows-Panels/user.md b/docs/content/dev/features/Legacy-Windows-Panels/Timedate.md similarity index 85% rename from docs/content/dev/features/Legacy-Windows-Panels/user.md rename to docs/content/dev/features/Legacy-Windows-Panels/Timedate.md index 649c25b5..e7fface2 100644 --- a/docs/content/dev/features/Legacy-Windows-Panels/user.md +++ b/docs/content/dev/features/Legacy-Windows-Panels/Timedate.md @@ -1,8 +1,8 @@ --- -title: "User Accounts" +title: "Time and Date" description: "" --- -```powershell +```powershell {filename="functions/public/Invoke-WPFControlPanel.ps1",linenos=inline,linenostart=1} function Invoke-WPFControlPanel { <# diff --git a/docs/content/dev/features/Legacy-Windows-Panels/control.md b/docs/content/dev/features/Legacy-Windows-Panels/control.md index 35b44eef..654e4ca3 100644 --- a/docs/content/dev/features/Legacy-Windows-Panels/control.md +++ b/docs/content/dev/features/Legacy-Windows-Panels/control.md @@ -2,7 +2,7 @@ title: "Control Panel" description: "" --- -```powershell +```powershell {filename="functions/public/Invoke-WPFControlPanel.ps1",linenos=inline,linenostart=1} function Invoke-WPFControlPanel { <# diff --git a/docs/content/dev/features/Legacy-Windows-Panels/network.md b/docs/content/dev/features/Legacy-Windows-Panels/network.md index ae56dd59..943c0f03 100644 --- a/docs/content/dev/features/Legacy-Windows-Panels/network.md +++ b/docs/content/dev/features/Legacy-Windows-Panels/network.md @@ -2,7 +2,7 @@ title: "Network Connections" description: "" --- -```powershell +```powershell {filename="functions/public/Invoke-WPFControlPanel.ps1",linenos=inline,linenostart=1} function Invoke-WPFControlPanel { <# diff --git a/docs/content/dev/features/Legacy-Windows-Panels/power.md b/docs/content/dev/features/Legacy-Windows-Panels/power.md index 075526fd..c5eddc33 100644 --- a/docs/content/dev/features/Legacy-Windows-Panels/power.md +++ b/docs/content/dev/features/Legacy-Windows-Panels/power.md @@ -2,7 +2,7 @@ title: "Power Panel" description: "" --- -```powershell +```powershell {filename="functions/public/Invoke-WPFControlPanel.ps1",linenos=inline,linenostart=1} function Invoke-WPFControlPanel { <# diff --git a/docs/content/dev/features/Legacy-Windows-Panels/printer.md b/docs/content/dev/features/Legacy-Windows-Panels/printer.md index 455bc9b6..6ce3e8b2 100644 --- a/docs/content/dev/features/Legacy-Windows-Panels/printer.md +++ b/docs/content/dev/features/Legacy-Windows-Panels/printer.md @@ -1,8 +1,8 @@ --- -title: "Printer Settings" +title: "Printer Panel" description: "" --- -```powershell +```powershell {filename="functions/public/Invoke-WPFControlPanel.ps1",linenos=inline,linenostart=1} function Invoke-WPFControlPanel { <# diff --git a/docs/content/dev/features/Legacy-Windows-Panels/region.md b/docs/content/dev/features/Legacy-Windows-Panels/region.md index 50d7a33a..f355130c 100644 --- a/docs/content/dev/features/Legacy-Windows-Panels/region.md +++ b/docs/content/dev/features/Legacy-Windows-Panels/region.md @@ -2,7 +2,7 @@ title: "Region" description: "" --- -```powershell +```powershell {filename="functions/public/Invoke-WPFControlPanel.ps1",linenos=inline,linenostart=1} function Invoke-WPFControlPanel { <# diff --git a/docs/content/dev/features/Legacy-Windows-Panels/sound.md b/docs/content/dev/features/Legacy-Windows-Panels/sound.md index 3826696c..6d3bc68c 100644 --- a/docs/content/dev/features/Legacy-Windows-Panels/sound.md +++ b/docs/content/dev/features/Legacy-Windows-Panels/sound.md @@ -2,7 +2,7 @@ title: "Sound Settings" description: "" --- -```powershell +```powershell {filename="functions/public/Invoke-WPFControlPanel.ps1",linenos=inline,linenostart=1} function Invoke-WPFControlPanel { <# diff --git a/docs/content/dev/features/Legacy-Windows-Panels/system.md b/docs/content/dev/features/Legacy-Windows-Panels/system.md index d48474f2..f00eee46 100644 --- a/docs/content/dev/features/Legacy-Windows-Panels/system.md +++ b/docs/content/dev/features/Legacy-Windows-Panels/system.md @@ -2,7 +2,7 @@ title: "System Properties" description: "" --- -```powershell +```powershell {filename="functions/public/Invoke-WPFControlPanel.ps1",linenos=inline,linenostart=1} function Invoke-WPFControlPanel { <# diff --git a/docs/content/dev/tweaks/Customize-Preferences/BingSearch.md b/docs/content/dev/tweaks/Customize-Preferences/BingSearch.md index 7884434e..1496704b 100644 --- a/docs/content/dev/tweaks/Customize-Preferences/BingSearch.md +++ b/docs/content/dev/tweaks/Customize-Preferences/BingSearch.md @@ -2,13 +2,12 @@ title: "Bing Search in Start Menu" description: "" --- -```json -"WPFToggleBingSearch": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=2194} + "WPFToggleBingSearch": { "Content": "Bing Search in Start Menu", "Description": "If enable then includes web search results from Bing in your Start Menu search.", "category": "Customize Preferences", "panel": "2", - "Order": "a101_", "Type": "Toggle", "registry": [ { @@ -23,6 +22,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Customize-Preferences/DarkMode.md b/docs/content/dev/tweaks/Customize-Preferences/DarkMode.md index 700849f0..f7c4389e 100644 --- a/docs/content/dev/tweaks/Customize-Preferences/DarkMode.md +++ b/docs/content/dev/tweaks/Customize-Preferences/DarkMode.md @@ -2,13 +2,12 @@ title: "Dark Theme for Windows" description: "" --- -```json -"WPFToggleDarkMode": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=2152} + "WPFToggleDarkMode": { "Content": "Dark Theme for Windows", "Description": "Enable/Disable Dark Mode.", "category": "Customize Preferences", "panel": "2", - "Order": "a100_", "Type": "Toggle", "registry": [ { @@ -47,6 +46,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Customize-Preferences/DetailedBSoD.md b/docs/content/dev/tweaks/Customize-Preferences/DetailedBSoD.md index 43e44df2..cf16614e 100644 --- a/docs/content/dev/tweaks/Customize-Preferences/DetailedBSoD.md +++ b/docs/content/dev/tweaks/Customize-Preferences/DetailedBSoD.md @@ -2,13 +2,12 @@ title: "Detailed BSoD" description: "" --- -```json -"WPFToggleDetailedBSoD": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=2540} + "WPFToggleDetailedBSoD": { "Content": "Detailed BSoD", "Description": "If Enabled then you will see a detailed Blue Screen of Death (BSOD) with more information.", "category": "Customize Preferences", "panel": "2", - "Order": "a205_", "Type": "Toggle", "registry": [ { @@ -31,6 +30,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Customize-Preferences/TaskbarWidgets.md b/docs/content/dev/tweaks/Customize-Preferences/DisableCrossDeviceResume.md similarity index 62% rename from docs/content/dev/tweaks/Customize-Preferences/TaskbarWidgets.md rename to docs/content/dev/tweaks/Customize-Preferences/DisableCrossDeviceResume.md index 12a03516..dd9c92fc 100644 --- a/docs/content/dev/tweaks/Customize-Preferences/TaskbarWidgets.md +++ b/docs/content/dev/tweaks/Customize-Preferences/DisableCrossDeviceResume.md @@ -1,19 +1,18 @@ --- -title: "Widgets Button in Taskbar" +title: "Cross-Device Resume" description: "" --- -```json - "WPFToggleTaskbarWidgets": { - "Content": "Widgets Button in Taskbar", - "Description": "If Enabled then Widgets Button in Taskbar will be shown.", +```json {filename="config/tweaks.json",linenos=inline,linenostart=2670} + "WPFToggleDisableCrossDeviceResume": { + "Content": "Cross-Device Resume", + "Description": "This tweak controls the Resume function in Windows 11 24H2 and later, which allows you to resume an activity from a mobile device and vice-versa.", "category": "Customize Preferences", "panel": "2", - "Order": "a204_", "Type": "Toggle", "registry": [ { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "Name": "TaskbarDa", + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\CrossDeviceResume\\Configuration", + "Name": "IsResumeAllowed", "Value": "1", "OriginalValue": "0", "DefaultState": "true", @@ -23,6 +22,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Customize-Preferences/HiddenFiles.md b/docs/content/dev/tweaks/Customize-Preferences/HiddenFiles.md index c7bcef79..a15cfd50 100644 --- a/docs/content/dev/tweaks/Customize-Preferences/HiddenFiles.md +++ b/docs/content/dev/tweaks/Customize-Preferences/HiddenFiles.md @@ -2,13 +2,12 @@ title: "Show Hidden Files" description: "" --- -```json -"WPFToggleHiddenFiles": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=2430} + "WPFToggleHiddenFiles": { "Content": "Show Hidden Files", "Description": "If Enabled then Hidden Files will be shown.", "category": "Customize Preferences", "panel": "2", - "Order": "a200_", "Type": "Toggle", "registry": [ { @@ -33,6 +32,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Customize-Preferences/SnapFlyout.md b/docs/content/dev/tweaks/Customize-Preferences/HideSettingsHome.md similarity index 50% rename from docs/content/dev/tweaks/Customize-Preferences/SnapFlyout.md rename to docs/content/dev/tweaks/Customize-Preferences/HideSettingsHome.md index 030cdd63..c1e97188 100644 --- a/docs/content/dev/tweaks/Customize-Preferences/SnapFlyout.md +++ b/docs/content/dev/tweaks/Customize-Preferences/HideSettingsHome.md @@ -1,38 +1,28 @@ --- -title: "Snap Assist Flyout" +title: "Remove Settings Home Page" description: "" --- -```json -"WPFToggleSnapFlyout": { - "Content": "Snap Assist Flyout", - "Description": "If disabled then Snap preview is disabled when maximize button is hovered.", +```json {filename="config/tweaks.json",linenos=inline,linenostart=2300} + "WPFToggleHideSettingsHome": { + "Content": "Remove Settings Home Page", + "Description": "Removes the Home page in the Windows Settings app.", "category": "Customize Preferences", "panel": "2", - "Order": "a107_", "Type": "Toggle", "registry": [ { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "Name": "EnableSnapAssistFlyout", - "Value": "1", - "OriginalValue": "0", - "DefaultState": "true", - "Type": "DWord" + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", + "Name": "SettingsPageVisibility", + "Type": "String", + "Value": "hide:home", + "OriginalValue": "show:home", + "DefaultState": "false" } ], - "InvokeScript": [ - " - Invoke-WinUtilExplorerUpdate -action \"restart\" - " - ], - "UndoScript": [ - " - Invoke-WinUtilExplorerUpdate -action \"restart\" - " - ], ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Customize-Preferences/MouseAcceleration.md b/docs/content/dev/tweaks/Customize-Preferences/MouseAcceleration.md index 82631ff1..181857b4 100644 --- a/docs/content/dev/tweaks/Customize-Preferences/MouseAcceleration.md +++ b/docs/content/dev/tweaks/Customize-Preferences/MouseAcceleration.md @@ -2,13 +2,12 @@ title: "Mouse Acceleration" description: "" --- -```json -"WPFToggleMouseAcceleration": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=2318} + "WPFToggleMouseAcceleration": { "Content": "Mouse Acceleration", "Description": "If Enabled then Cursor movement is affected by the speed of your physical mouse movements.", "category": "Customize Preferences", "panel": "2", - "Order": "a109_", "Type": "Toggle", "registry": [ { @@ -39,6 +38,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Customize-Preferences/MultiplaneOverlay.md b/docs/content/dev/tweaks/Customize-Preferences/MultiplaneOverlay.md new file mode 100644 index 00000000..e9fd0893 --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/MultiplaneOverlay.md @@ -0,0 +1,28 @@ +--- +title: "Disable Multiplane Overlay" +description: "" +--- +```json {filename="config/tweaks.json",linenos=inline,linenostart=2412} + "WPFToggleMultiplaneOverlay": { + "Content": "Disable Multiplane Overlay", + "Description": "Disable the Multiplane Overlay which can sometimes cause issues with Graphics Cards.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Dwm", + "Name": "OverlayTestMode", + "Value": "5", + "OriginalValue": "", + "DefaultState": "false", + "Type": "DWord" + } + ], +``` + +## Registry Changes + +Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. + +You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Customize-Preferences/NewOutlook.md b/docs/content/dev/tweaks/Customize-Preferences/NewOutlook.md new file mode 100644 index 00000000..e6d43644 --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/NewOutlook.md @@ -0,0 +1,52 @@ +--- +title: "New Outlook" +description: "" +--- +```json {filename="config/tweaks.json",linenos=inline,linenostart=2370} + "WPFToggleNewOutlook": { + "Content": "New Outlook", + "Description": "If disabled it removes the toggle for new Outlook, disables the new Outlook migration and makes sure the Outlook Application actually uses the old Outlook.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKCU:\\SOFTWARE\\Microsoft\\Office\\16.0\\Outlook\\Preferences", + "Name": "UseNewOutlook", + "Value": "1", + "OriginalValue": "0", + "DefaultState": "true", + "Type": "DWord" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\Office\\16.0\\Outlook\\Options\\General", + "Name": "HideNewOutlookToggle", + "Value": "0", + "OriginalValue": "1", + "DefaultState": "true", + "Type": "DWord" + }, + { + "Path": "HKCU:\\Software\\Policies\\Microsoft\\Office\\16.0\\Outlook\\Options\\General", + "Name": "DoNewOutlookAutoMigration", + "Value": "0", + "OriginalValue": "0", + "DefaultState": "false", + "Type": "DWord" + }, + { + "Path": "HKCU:\\Software\\Policies\\Microsoft\\Office\\16.0\\Outlook\\Preferences", + "Name": "NewOutlookMigrationUserSetting", + "Value": "0", + "OriginalValue": "", + "DefaultState": "true", + "Type": "DWord" + } + ], +``` + +## Registry Changes + +Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. + +You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Customize-Preferences/NumLock.md b/docs/content/dev/tweaks/Customize-Preferences/NumLock.md index 48af40d5..f5aaa89c 100644 --- a/docs/content/dev/tweaks/Customize-Preferences/NumLock.md +++ b/docs/content/dev/tweaks/Customize-Preferences/NumLock.md @@ -2,13 +2,12 @@ title: "NumLock on Startup" description: "" --- -```json -"WPFToggleNumLock": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=2212} + "WPFToggleNumLock": { "Content": "NumLock on Startup", "Description": "Toggle the Num Lock key state when your computer starts.", "category": "Customize Preferences", "panel": "2", - "Order": "a102_", "Type": "Toggle", "registry": [ { @@ -31,6 +30,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Customize-Preferences/SnapWindow.md b/docs/content/dev/tweaks/Customize-Preferences/S3Sleep.md similarity index 55% rename from docs/content/dev/tweaks/Customize-Preferences/SnapWindow.md rename to docs/content/dev/tweaks/Customize-Preferences/S3Sleep.md index 98087f27..a3fe20e7 100644 --- a/docs/content/dev/tweaks/Customize-Preferences/SnapWindow.md +++ b/docs/content/dev/tweaks/Customize-Preferences/S3Sleep.md @@ -1,28 +1,28 @@ --- -title: "Snap Window" +title: "S3 Sleep" description: "" --- -```json -"WPFToggleSnapWindow": { - "Content": "Snap Window", - "Description": "If enabled you can align windows by dragging them. | Relogin Required", +```json {filename="config/tweaks.json",linenos=inline,linenostart=2566} + "WPFToggleS3Sleep": { + "Content": "S3 Sleep", + "Description": "Toggles between Modern Standby and S3 sleep.", "category": "Customize Preferences", "panel": "2", - "Order": "a106_", "Type": "Toggle", "registry": [ { - "Path": "HKCU:\\Control Panel\\Desktop", - "Name": "WindowArrangementActive", - "Value": "1", - "OriginalValue": "0", - "DefaultState": "true", - "Type": "String" + "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Power", + "Name": "PlatformAoAcOverride", + "Value": "0", + "OriginalValue": "", + "DefaultState": "false", + "Type": "DWord" } ], ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Customize-Preferences/ShowExt.md b/docs/content/dev/tweaks/Customize-Preferences/ShowExt.md index fc5d039d..eb4537a7 100644 --- a/docs/content/dev/tweaks/Customize-Preferences/ShowExt.md +++ b/docs/content/dev/tweaks/Customize-Preferences/ShowExt.md @@ -2,13 +2,12 @@ title: "Show File Extensions" description: "" --- -```json -"WPFToggleShowExt": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=2458} + "WPFToggleShowExt": { "Content": "Show File Extensions", "Description": "If enabled then File extensions (e.g., .txt, .jpg) are visible.", "category": "Customize Preferences", "panel": "2", - "Order": "a201_", "Type": "Toggle", "registry": [ { @@ -33,6 +32,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Customize-Preferences/SnapSuggestion.md b/docs/content/dev/tweaks/Customize-Preferences/SnapSuggestion.md deleted file mode 100644 index 45f9fc88..00000000 --- a/docs/content/dev/tweaks/Customize-Preferences/SnapSuggestion.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: "Snap Assist Suggestion" -description: "" ---- -```json -"WPFToggleSnapSuggestion": { - "Content": "Snap Assist Suggestion", - "Description": "If enabled then you will get suggestions to snap other applications in the left over spaces.", - "category": "Customize Preferences", - "panel": "2", - "Order": "a108_", - "Type": "Toggle", - "registry": [ - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "Name": "SnapAssist", - "Value": "1", - "OriginalValue": "0", - "DefaultState": "true", - "Type": "DWord" - } - ], - "InvokeScript": [ - " - Invoke-WinUtilExplorerUpdate -action \"restart\" - " - ], - "UndoScript": [ - " - Invoke-WinUtilExplorerUpdate -action \"restart\" - " - ], -``` - -## Registry Changes -Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. - -You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Customize-Preferences/StartMenuRecommendations.md b/docs/content/dev/tweaks/Customize-Preferences/StartMenuRecommendations.md new file mode 100644 index 00000000..ee8af654 --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/StartMenuRecommendations.md @@ -0,0 +1,54 @@ +--- +title: "Recommendations in Start Menu" +description: "" +--- +```json {filename="config/tweaks.json",linenos=inline,linenostart=2256} + "WPFToggleStartMenuRecommendations": { + "Content": "Recommendations in Start Menu", + "Description": "If disabled then you will not see recommendations in the Start Menu.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKLM:\\SOFTWARE\\Microsoft\\PolicyManager\\current\\device\\Start", + "Name": "HideRecommendedSection", + "Value": "0", + "OriginalValue": "1", + "DefaultState": "true", + "Type": "DWord" + }, + { + "Path": "HKLM:\\SOFTWARE\\Microsoft\\PolicyManager\\current\\device\\Education", + "Name": "IsEducationEnvironment", + "Value": "0", + "OriginalValue": "1", + "DefaultState": "true", + "Type": "DWord" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer", + "Name": "HideRecommendedSection", + "Value": "0", + "OriginalValue": "1", + "DefaultState": "true", + "Type": "DWord" + } + ], + "InvokeScript": [ + " + Invoke-WinUtilExplorerUpdate -action \"restart\" + " + ], + "UndoScript": [ + " + Invoke-WinUtilExplorerUpdate -action \"restart\" + " + ], +``` + +## Registry Changes + +Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. + +You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Customize-Preferences/StickyKeys.md b/docs/content/dev/tweaks/Customize-Preferences/StickyKeys.md index 2f893bd5..0082e54e 100644 --- a/docs/content/dev/tweaks/Customize-Preferences/StickyKeys.md +++ b/docs/content/dev/tweaks/Customize-Preferences/StickyKeys.md @@ -2,13 +2,12 @@ title: "Sticky Keys" description: "" --- -```json -"WPFToggleStickyKeys": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=2352} + "WPFToggleStickyKeys": { "Content": "Sticky Keys", "Description": "If Enabled then Sticky Keys is activated - Sticky keys is an accessibility feature of some graphical user interfaces which assists users who have physical disabilities or help users reduce repetitive strain injury.", "category": "Customize Preferences", "panel": "2", - "Order": "a110_", "Type": "Toggle", "registry": [ { @@ -23,6 +22,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Customize-Preferences/TaskView.md b/docs/content/dev/tweaks/Customize-Preferences/TaskView.md index e5c2aebd..68ef49af 100644 --- a/docs/content/dev/tweaks/Customize-Preferences/TaskView.md +++ b/docs/content/dev/tweaks/Customize-Preferences/TaskView.md @@ -2,13 +2,12 @@ title: "Task View Button in Taskbar" description: "" --- -```json -"WPFToggleTaskView": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=2504} + "WPFToggleTaskView": { "Content": "Task View Button in Taskbar", "Description": "If Enabled then Task View Button in Taskbar will be shown.", "category": "Customize Preferences", "panel": "2", - "Order": "a203_", "Type": "Toggle", "registry": [ { @@ -23,6 +22,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Customize-Preferences/TaskbarAlignment.md b/docs/content/dev/tweaks/Customize-Preferences/TaskbarAlignment.md index b830b957..e9b75e1f 100644 --- a/docs/content/dev/tweaks/Customize-Preferences/TaskbarAlignment.md +++ b/docs/content/dev/tweaks/Customize-Preferences/TaskbarAlignment.md @@ -2,13 +2,12 @@ title: "Center Taskbar Items" description: "" --- -```json -"WPFToggleTaskbarAlignment": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=2522} + "WPFToggleTaskbarAlignment": { "Content": "Center Taskbar Items", "Description": "[Windows 11] If Enabled then the Taskbar Items will be shown on the Center, otherwise the Taskbar Items will be shown on the Left.", "category": "Customize Preferences", "panel": "2", - "Order": "a204_", "Type": "Toggle", "registry": [ { @@ -23,6 +22,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Customize-Preferences/TaskbarSearch.md b/docs/content/dev/tweaks/Customize-Preferences/TaskbarSearch.md index 5f274b7f..0f86fdd5 100644 --- a/docs/content/dev/tweaks/Customize-Preferences/TaskbarSearch.md +++ b/docs/content/dev/tweaks/Customize-Preferences/TaskbarSearch.md @@ -2,13 +2,12 @@ title: "Search Button in Taskbar" description: "" --- -```json -"WPFToggleTaskbarSearch": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=2486} + "WPFToggleTaskbarSearch": { "Content": "Search Button in Taskbar", "Description": "If Enabled Search Button will be on the taskbar.", "category": "Customize Preferences", "panel": "2", - "Order": "a202_", "Type": "Toggle", "registry": [ { @@ -23,6 +22,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Customize-Preferences/VerboseLogon.md b/docs/content/dev/tweaks/Customize-Preferences/VerboseLogon.md index 85a5d8f7..f691066e 100644 --- a/docs/content/dev/tweaks/Customize-Preferences/VerboseLogon.md +++ b/docs/content/dev/tweaks/Customize-Preferences/VerboseLogon.md @@ -2,13 +2,12 @@ title: "Verbose Messages During Logon" description: "" --- -```json -"WPFToggleVerboseLogon": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=2238} + "WPFToggleVerboseLogon": { "Content": "Verbose Messages During Logon", "Description": "Show detailed messages during the login process for troubleshooting and diagnostics.", "category": "Customize Preferences", "panel": "2", - "Order": "a103_", "Type": "Toggle", "registry": [ { @@ -23,6 +22,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Essential-Tweaks/Activity.md b/docs/content/dev/tweaks/Essential-Tweaks/Activity.md index 276b2f51..218fdeb9 100644 --- a/docs/content/dev/tweaks/Essential-Tweaks/Activity.md +++ b/docs/content/dev/tweaks/Essential-Tweaks/Activity.md @@ -1,15 +1,13 @@ --- -title: Activity History +title: "Disable Activity History" description: "" --- - -```json +```json {filename="config/tweaks.json",linenos=inline,linenostart=2} "WPFTweaksActivity": { "Content": "Disable Activity History", "Description": "This erases recent docs, clipboard, and run history.", "category": "Essential Tweaks", "panel": "1", - "Order": "a005_", "registry": [ { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System", diff --git a/docs/content/dev/tweaks/Essential-Tweaks/ConsumerFeatures.md b/docs/content/dev/tweaks/Essential-Tweaks/ConsumerFeatures.md index f2dd40dc..4b623bf4 100644 --- a/docs/content/dev/tweaks/Essential-Tweaks/ConsumerFeatures.md +++ b/docs/content/dev/tweaks/Essential-Tweaks/ConsumerFeatures.md @@ -2,13 +2,12 @@ title: "Disable ConsumerFeatures" description: "" --- -```json +```json {filename="config/tweaks.json",linenos=inline,linenostart=1299} "WPFTweaksConsumerFeatures": { "Content": "Disable ConsumerFeatures", "Description": "Windows will not automatically install any games, third-party apps, or application links from the Windows Store for the signed-in user. Some default Apps will be inaccessible (eg. Phone Link)", "category": "Essential Tweaks", "panel": "1", - "Order": "a003_", "registry": [ { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent", @@ -21,6 +20,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Essential-Tweaks/DeleteTempFiles.md b/docs/content/dev/tweaks/Essential-Tweaks/DeleteTempFiles.md index dde85ab1..c5759207 100644 --- a/docs/content/dev/tweaks/Essential-Tweaks/DeleteTempFiles.md +++ b/docs/content/dev/tweaks/Essential-Tweaks/DeleteTempFiles.md @@ -2,13 +2,12 @@ title: "Delete Temporary Files" description: "" --- -```json +```json {filename="config/tweaks.json",linenos=inline,linenostart=2047} "WPFTweaksDeleteTempFiles": { "Content": "Delete Temporary Files", "Description": "Erases TEMP Folders", "category": "Essential Tweaks", "panel": "1", - "Order": "a002_", "InvokeScript": [ " Remove-Item -Path \"$Env:Temp\\*\" -Recurse -Force diff --git a/docs/content/dev/tweaks/Essential-Tweaks/DisableExplorerAutoDiscovery.md b/docs/content/dev/tweaks/Essential-Tweaks/DisableExplorerAutoDiscovery.md new file mode 100644 index 00000000..b21b40ad --- /dev/null +++ b/docs/content/dev/tweaks/Essential-Tweaks/DisableExplorerAutoDiscovery.md @@ -0,0 +1,59 @@ +--- +title: "Disable Explorer Automatic Folder Discovery" +description: "" +--- +```json {filename="config/tweaks.json",linenos=inline,linenostart=2615} + "WPFTweaksDisableExplorerAutoDiscovery": { + "Content": "Disable Explorer Automatic Folder Discovery", + "Description": "Windows Explorer automatically tries to guess the type of the folder based on its contents, slowing down the browsing experience.", + "category": "Essential Tweaks", + "panel": "1", + "InvokeScript": [ + " + # Previously detected folders + $bags = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\Bags\" + + # Folder types lookup table + $bagMRU = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\BagMRU\" + + # Flush Explorer view database + Remove-Item -Path $bags -Recurse -Force + Write-Host \"Removed $bags\" + + Remove-Item -Path $bagMRU -Recurse -Force + Write-Host \"Removed $bagMRU\" + + # Every folder + $allFolders = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\Bags\\AllFolders\\Shell\" + + if (!(Test-Path $allFolders)) { + New-Item -Path $allFolders -Force + Write-Host \"Created $allFolders\" + } + + # Generic view + New-ItemProperty -Path $allFolders -Name \"FolderType\" -Value \"NotSpecified\" -PropertyType String -Force + Write-Host \"Set FolderType to NotSpecified\" + + Write-Host Please sign out and back in, or restart your computer to apply the changes! + " + ], + "UndoScript": [ + " + # Previously detected folders + $bags = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\Bags\" + + # Folder types lookup table + $bagMRU = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\BagMRU\" + + # Flush Explorer view database + Remove-Item -Path $bags -Recurse -Force + Write-Host \"Removed $bags\" + + Remove-Item -Path $bagMRU -Recurse -Force + Write-Host \"Removed $bagMRU\" + + Write-Host Please sign out and back in, or restart your computer to apply the changes! + " + ], +``` diff --git a/docs/content/dev/tweaks/Essential-Tweaks/DiskCleanup.md b/docs/content/dev/tweaks/Essential-Tweaks/DiskCleanup.md index 9b65dc38..8076e1ca 100644 --- a/docs/content/dev/tweaks/Essential-Tweaks/DiskCleanup.md +++ b/docs/content/dev/tweaks/Essential-Tweaks/DiskCleanup.md @@ -2,13 +2,12 @@ title: "Run Disk Cleanup" description: "" --- -```json +```json {filename="config/tweaks.json",linenos=inline,linenostart=2034} "WPFTweaksDiskCleanup": { "Content": "Run Disk Cleanup", "Description": "Runs Disk Cleanup on Drive C: and removes old Windows Updates.", "category": "Essential Tweaks", "panel": "1", - "Order": "a009_", "InvokeScript": [ " cleanmgr.exe /d C: /VERYLOWDISK diff --git a/docs/content/dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar.md b/docs/content/dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar.md index 5061592a..8c65146b 100644 --- a/docs/content/dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar.md +++ b/docs/content/dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar.md @@ -2,13 +2,12 @@ title: "Enable End Task With Right Click" description: "" --- -```json +```json {filename="config/tweaks.json",linenos=inline,linenostart=1771} "WPFTweaksEndTaskOnTaskbar": { "Content": "Enable End Task With Right Click", "Description": "Enables option to end task when right clicking a program in the taskbar", "category": "Essential Tweaks", "panel": "1", - "Order": "a006_", "registry": [ { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings", @@ -21,6 +20,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Essential-Tweaks/GameDVR.md b/docs/content/dev/tweaks/Essential-Tweaks/GameDVR.md deleted file mode 100644 index a7c4e503..00000000 --- a/docs/content/dev/tweaks/Essential-Tweaks/GameDVR.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: "Disable GameDVR" -description: "" ---- -```json -"WPFTweaksDVR": { - "Content": "Disable GameDVR", - "Description": "GameDVR is a Windows App that is a dependency for some Store Games. I've never met someone that likes it, but it's there for the XBOX crowd.", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a005_", - "registry": [ - { - "Path": "HKCU:\\System\\GameConfigStore", - "Name": "GameDVR_FSEBehavior", - "Value": "2", - "OriginalValue": "1", - "Type": "DWord" - }, - { - "Path": "HKCU:\\System\\GameConfigStore", - "Name": "GameDVR_Enabled", - "Value": "0", - "OriginalValue": "1", - "Type": "DWord" - }, - { - "Path": "HKCU:\\System\\GameConfigStore", - "Name": "GameDVR_HonorUserFSEBehaviorMode", - "Value": "1", - "OriginalValue": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\System\\GameConfigStore", - "Name": "GameDVR_EFSEFeatureFlags", - "Value": "0", - "OriginalValue": "1", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\GameDVR", - "Name": "AllowGameDVR", - "Value": "0", - "OriginalValue": "", - "Type": "DWord" - } - ], -``` - -## Registry Changes -Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. - -You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Essential-Tweaks/Hibernation.md b/docs/content/dev/tweaks/Essential-Tweaks/Hiber.md similarity index 93% rename from docs/content/dev/tweaks/Essential-Tweaks/Hibernation.md rename to docs/content/dev/tweaks/Essential-Tweaks/Hiber.md index d17f46a9..bc0ab5a1 100644 --- a/docs/content/dev/tweaks/Essential-Tweaks/Hibernation.md +++ b/docs/content/dev/tweaks/Essential-Tweaks/Hiber.md @@ -2,13 +2,12 @@ title: "Disable Hibernation" description: "" --- -```json -"WPFTweaksHiber": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=32} + "WPFTweaksHiber": { "Content": "Disable Hibernation", "Description": "Hibernation is really meant for laptops as it saves what's in memory before turning the pc off. It really should never be used", "category": "Essential Tweaks", "panel": "1", - "Order": "a005_", "registry": [ { "Path": "HKLM:\\System\\CurrentControlSet\\Control\\Session Manager\\Power", @@ -34,6 +33,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Essential-Tweaks/Location.md b/docs/content/dev/tweaks/Essential-Tweaks/Location.md index a087aba9..d5b5a03e 100644 --- a/docs/content/dev/tweaks/Essential-Tweaks/Location.md +++ b/docs/content/dev/tweaks/Essential-Tweaks/Location.md @@ -2,13 +2,12 @@ title: "Disable Location Tracking" description: "" --- -```json -"WPFTweaksLocation": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=133} + "WPFTweaksLocation": { "Content": "Disable Location Tracking", "Description": "Disables Location Tracking...DUH!", "category": "Essential Tweaks", "panel": "1", - "Order": "a005_", "registry": [ { "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\location", @@ -42,6 +41,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Essential-Tweaks/Powershell7Tele.md b/docs/content/dev/tweaks/Essential-Tweaks/Powershell7Tele.md index 050fe559..b50a27d8 100644 --- a/docs/content/dev/tweaks/Essential-Tweaks/Powershell7Tele.md +++ b/docs/content/dev/tweaks/Essential-Tweaks/Powershell7Tele.md @@ -2,13 +2,12 @@ title: "Disable Powershell 7 Telemetry" description: "" --- -```json -"WPFTweaksPowershell7Tele": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=1787} + "WPFTweaksPowershell7Tele": { "Content": "Disable Powershell 7 Telemetry", "Description": "This will create an Environment Variable called 'POWERSHELL_TELEMETRY_OPTOUT' with a value of '1' which will tell Powershell 7 to not send Telemetry Data.", "category": "Essential Tweaks", "panel": "1", - "Order": "a005_", "InvokeScript": [ "[Environment]::SetEnvironmentVariable('POWERSHELL_TELEMETRY_OPTOUT', '1', 'Machine')" ], diff --git a/docs/content/dev/tweaks/Essential-Tweaks/RestorePoint.md b/docs/content/dev/tweaks/Essential-Tweaks/RestorePoint.md index 77781257..573fcc61 100644 --- a/docs/content/dev/tweaks/Essential-Tweaks/RestorePoint.md +++ b/docs/content/dev/tweaks/Essential-Tweaks/RestorePoint.md @@ -2,14 +2,13 @@ title: "Create Restore Point" description: "" --- -```json -"WPFTweaksRestorePoint": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=1744} + "WPFTweaksRestorePoint": { "Content": "Create Restore Point", "Description": "Creates a restore point at runtime in case a revert is needed from WinUtil modifications", "category": "Essential Tweaks", "panel": "1", "Checked": "False", - "Order": "a001_", "registry": [ { "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore", @@ -30,3 +29,9 @@ description: "" " ], ``` + +## Registry Changes + +Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. + +You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Essential-Tweaks/Services.md b/docs/content/dev/tweaks/Essential-Tweaks/Services.md index 76adbaa9..82bace5b 100644 --- a/docs/content/dev/tweaks/Essential-Tweaks/Services.md +++ b/docs/content/dev/tweaks/Essential-Tweaks/Services.md @@ -2,13 +2,12 @@ title: "Set Services to Manual" description: "" --- -```json - "WPFTweaksServices": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=170} + "WPFTweaksServices": { "Content": "Set Services to Manual", "Description": "Turns a bunch of system services to manual that don't need to be running all the time. This is pretty harmless as if the service is needed, it will simply start on demand.", "category": "Essential Tweaks", "panel": "1", - "Order": "a014_", "service": [ { "Name": "ALG", @@ -522,7 +521,7 @@ description: "" }, { "Name": "TermService", - "StartupType": "Automatic", + "StartupType": "Manual", "OriginalType": "Manual" }, { @@ -582,7 +581,7 @@ description: "" }, { "Name": "VaultSvc", - "StartupType": "Automatic", + "StartupType": "Manual", "OriginalType": "Manual" }, { @@ -968,7 +967,7 @@ description: "" ], ``` #Function -```powershell +```powershell {filename="functions/private/Set-WinUtilService.ps1",linenos=inline,linenostart=1} Function Set-WinUtilService { <# diff --git a/docs/content/dev/tweaks/Essential-Tweaks/Telemetry.md b/docs/content/dev/tweaks/Essential-Tweaks/Telemetry.md index dbc517e3..d483534e 100644 --- a/docs/content/dev/tweaks/Essential-Tweaks/Telemetry.md +++ b/docs/content/dev/tweaks/Essential-Tweaks/Telemetry.md @@ -2,13 +2,12 @@ title: "Disable Telemetry" description: "" --- -```json +```json {filename="config/tweaks.json",linenos=inline,linenostart=1315} "WPFTweaksTelemetry": { "Content": "Disable Telemetry", "Description": "Disables Microsoft Telemetry...Duh", "category": "Essential Tweaks", "panel": "1", - "Order": "a003_", "registry": [ { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\AdvertisingInfo", @@ -109,7 +108,7 @@ description: "" $Memory = (Get-CimInstance Win32_PhysicalMemory | Measure-Object Capacity -Sum).Sum / 1KB Set-ItemProperty -Path \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\" -Name SvcHostSplitThresholdInKB -Value $Memory - Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Siuf\Rules" -Name "PeriodInNanoSeconds" + Remove-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Siuf\\Rules\" -Name PeriodInNanoSeconds " ], "UndoScript": [ diff --git a/docs/content/dev/tweaks/Essential-Tweaks/WPBT.md b/docs/content/dev/tweaks/Essential-Tweaks/WPBT.md index c671c732..70c6e4fc 100644 --- a/docs/content/dev/tweaks/Essential-Tweaks/WPBT.md +++ b/docs/content/dev/tweaks/Essential-Tweaks/WPBT.md @@ -2,14 +2,12 @@ title: "Disable Windows Platform Binary Table (WPBT)" description: "" --- - -```json +```json {filename="config/tweaks.json",linenos=inline,linenostart=1901} "WPFTweaksWPBT": { "Content": "Disable Windows Platform Binary Table (WPBT)", "Description": "If enabled then allows your computer vendor to execute a program each time it boots. It enables computer vendors to force install anti-theft software, software drivers, or a software program conveniently. This could also be a security risk.", "category": "Essential Tweaks", "panel": "1", - "Order": "a005_", "registry": [ { "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager", diff --git a/docs/content/dev/tweaks/Essential-Tweaks/Widget.md b/docs/content/dev/tweaks/Essential-Tweaks/Widget.md index 92a44321..738fcdd8 100644 --- a/docs/content/dev/tweaks/Essential-Tweaks/Widget.md +++ b/docs/content/dev/tweaks/Essential-Tweaks/Widget.md @@ -2,14 +2,12 @@ title: "Remove Widgets" description: "" --- - -```json +```json {filename="config/tweaks.json",linenos=inline,linenostart=61} "WPFTweaksWidget": { "Content": "Remove Widgets", "Description": "Removes the annoying widgets in the bottom left of the taskbar", "category": "Essential Tweaks", "panel": "1", - "Order": "a005_", "InvokeScript": [ " # Sometimes if you dont stop Widgets Process for removal to work diff --git a/docs/content/dev/tweaks/Performance-Plans/AddUltPerf.md b/docs/content/dev/tweaks/Performance-Plans/AddUltPerf.md new file mode 100644 index 00000000..0c80256e --- /dev/null +++ b/docs/content/dev/tweaks/Performance-Plans/AddUltPerf.md @@ -0,0 +1,90 @@ +--- +title: "Add and Activate Ultimate Performance Profile" +description: "" +--- +```powershell {filename="functions/public/Invoke-WPFUltimatePerformance.ps1",linenos=inline,linenostart=1} +Function Invoke-WPFUltimatePerformance { + <# + + .SYNOPSIS + Enables or disables the Ultimate Performance power scheme based on its GUID. + + .PARAMETER State + Specifies whether to "Enable" or "Disable" the Ultimate Performance power scheme. + + #> + param( + [Parameter(Mandatory = $true)] + [ValidateSet("Enable", "Disable")] + [string]$State + ) + + try { + # GUID of the Ultimate Performance power plan + $ultimateGUID = "e9a42b02-d5df-448d-aa00-03f14749eb61" + + switch ($State) { + "Enable" { + # Duplicate the Ultimate Performance power plan using its GUID + $duplicateOutput = powercfg /duplicatescheme $ultimateGUID + + $guid = $null + $nameFromFile = "ChrisTitus - Ultimate Power Plan" + $description = "Ultimate Power Plan, added via WinUtils" + + # Extract the new GUID from the duplicateOutput + foreach ($line in $duplicateOutput) { + if ($line -match "\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\b") { + $guid = $matches[0] # $matches[0] will contain the first match, which is the GUID + Write-Output "GUID: $guid has been extracted and stored in the variable." + break + } + } + + if (-not $guid) { + Write-Output "No GUID found in the duplicateOutput. Check the output format." + exit 1 + } + + # Change the name of the power plan and set its description + $changeNameOutput = powercfg /changename $guid "$nameFromFile" "$description" + Write-Output "The power plan name and description have been changed. Output:" + Write-Output $changeNameOutput + + # Set the duplicated Ultimate Performance plan as active + $setActiveOutput = powercfg /setactive $guid + Write-Output "The power plan has been set as active. Output:" + Write-Output $setActiveOutput + + Write-Host "> Ultimate Performance plan installed and set as active." + } + "Disable" { + # Check if the Ultimate Performance plan is installed by GUID + $installedPlan = powercfg -list | Select-String -Pattern "ChrisTitus - Ultimate Power Plan" + + if ($installedPlan) { + # Extract the GUID of the installed Ultimate Performance plan + $ultimatePlanGUID = $installedPlan.Line.Split()[3] + + # Set a different power plan as active before deleting the Ultimate Performance plan + $balancedPlanGUID = "381b4222-f694-41f0-9685-ff5bb260df2e" + powercfg -setactive $balancedPlanGUID + + # Delete the Ultimate Performance plan by GUID + powercfg -delete $ultimatePlanGUID + + Write-Host "Ultimate Performance plan has been uninstalled." + Write-Host "> Balanced plan is now active." + } else { + Write-Host "Ultimate Performance plan is not installed." + } + } + default { + Write-Host "Invalid state. Please use 'Enable' or 'Disable'." + } + } + } catch { + Write-Error "Error occurred: $_" + } +} +``` diff --git a/docs/content/dev/tweaks/Performance-Plans/Profile.md b/docs/content/dev/tweaks/Performance-Plans/RemoveUltPerf.md similarity index 97% rename from docs/content/dev/tweaks/Performance-Plans/Profile.md rename to docs/content/dev/tweaks/Performance-Plans/RemoveUltPerf.md index bfa1b2e2..b5e965ea 100644 --- a/docs/content/dev/tweaks/Performance-Plans/Profile.md +++ b/docs/content/dev/tweaks/Performance-Plans/RemoveUltPerf.md @@ -2,7 +2,7 @@ title: "Remove Ultimate Performance Profile" description: "" --- -```powershell +```powershell {filename="functions/public/Invoke-WPFUltimatePerformance.ps1",linenos=inline,linenostart=1} Function Invoke-WPFUltimatePerformance { <# diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/BlockAdobeNet.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/BlockAdobeNet.md index a41dc88d..b96e37bf 100644 --- a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/BlockAdobeNet.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/BlockAdobeNet.md @@ -2,21 +2,20 @@ title: "Adobe Network Block" description: "" --- -```json -"WPFTweaksBlockAdobeNet": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=1982} + "WPFTweaksBlockAdobeNet": { "Content": "Adobe Network Block", "Description": "Reduce user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. Credit: Ruddernation-Designs", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a021_", "InvokeScript": [ " $hostsUrl = \"https://github.com/Ruddernation-Designs/Adobe-URL-Block-List/raw/refs/heads/master/hosts\" $hosts = \"$env:SystemRoot\\System32\\drivers\\etc\\hosts\" - Copy-Item $hosts \"$hosts.bak\" + Copy-Item $hosts \"$env:SystemRoot\\System32\\drivers\\etc\\hosts\\$hosts.bak\" Invoke-WebRequest $hostsUrl -OutFile $hosts - ipconfig flushdns + ipconfig /flushdns Write-Host \"Added Adobe url block list from host file\" " @@ -24,11 +23,10 @@ description: "" "UndoScript": [ " $hosts = \"$env:SystemRoot\\System32\\drivers\\etc\\hosts\" - $backup = \"$hosts.bak\" + $backup = \"$env:SystemRoot\\System32\\drivers\\etc\\hosts\\$hosts.bak\" - Copy-Item $backup $hosts - Remove-Item $backup - ipconfig flushdns + Remove-Item $hosts + ipconfig /flushdns Write-Host \"Removed Adobe url block list from host file\" " diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/BraveDebloat.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/BraveDebloat.md index 40c8be8b..300c79d6 100644 --- a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/BraveDebloat.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/BraveDebloat.md @@ -1,18 +1,16 @@ --- -title: "Debloat Brave" +title: "Brave Debloat" description: "" --- - -```json +```json {filename="config/tweaks.json",linenos=inline,linenostart=1134} "WPFTweaksBraveDebloat": { "Content": "Brave Debloat", "Description": "Disables various annoyances like Brave Rewards,Leo AI,Crypto Wallet and VPN", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a022_", "registry": [ { - "Path":"HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave", + "Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave", "Name": "BraveRewardsDisabled", "Type": "DWord", "Value": "1", @@ -48,3 +46,9 @@ description: "" } ], ``` + +## Registry Changes + +Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. + +You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DeBloat.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DeBloat.md index bd98b2e1..5593b732 100644 --- a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DeBloat.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DeBloat.md @@ -2,13 +2,12 @@ title: "Remove ALL MS Store Apps - NOT RECOMMENDED" description: "" --- -```json +```json {filename="config/tweaks.json",linenos=inline,linenostart=1655} "WPFTweaksDeBloat": { "Content": "Remove ALL MS Store Apps - NOT RECOMMENDED", "Description": "USE WITH CAUTION!!! This will remove ALL Microsoft store apps.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a028_", "appx": [ "Microsoft.Microsoft3DViewer", "Microsoft.AppConnector", diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableBGapps.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableBGapps.md index 6334342f..5ced1126 100644 --- a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableBGapps.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableBGapps.md @@ -2,13 +2,12 @@ title: "Disable Background Apps" description: "" --- -```json -"WPFTweaksDisableBGapps": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=2120} + "WPFTweaksDisableBGapps": { "Content": "Disable Background Apps", "Description": "Disables all Microsoft Store apps from running in the background, which has to be done individually since Win11", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a024_", "registry": [ { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\BackgroundAccessApplications", @@ -21,6 +20,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableFSO.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableFSO.md index 06903b45..453bb4b1 100644 --- a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableFSO.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableFSO.md @@ -2,13 +2,12 @@ title: "Disable Fullscreen Optimizations" description: "" --- -```json -"WPFTweaksDisableFSO": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=2136} + "WPFTweaksDisableFSO": { "Content": "Disable Fullscreen Optimizations", "Description": "Disables FSO in all applications. NOTE: This will disable Color Management in Exclusive Fullscreen", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a024_", "registry": [ { "Path": "HKCU:\\System\\GameConfigStore", @@ -21,6 +20,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableIPv6.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableIPv6.md index 5e14de0f..7cc07431 100644 --- a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableIPv6.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableIPv6.md @@ -2,13 +2,12 @@ title: "Disable IPv6" description: "" --- -```json -"WPFTweaksDisableIPv6": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=2098} + "WPFTweaksDisableIPv6": { "Content": "Disable IPv6", "Description": "Disables IPv6.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a024_", "registry": [ { "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters", @@ -27,6 +26,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableNotifications.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableNotifications.md index bf30daef..71577781 100644 --- a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableNotifications.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableNotifications.md @@ -2,13 +2,12 @@ title: "Disable Notification Tray/Calendar" description: "" --- -```json -"WPFTweaksDisableNotifications": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=1959} + "WPFTweaksDisableNotifications": { "Content": "Disable Notification Tray/Calendar", "Description": "Disables all Notifications INCLUDING Calendar", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a026_", "registry": [ { "Path": "HKCU:\\Software\\Policies\\Microsoft\\Windows\\Explorer", @@ -28,6 +27,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Display.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Display.md index 506cb6e9..d85ec551 100644 --- a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Display.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Display.md @@ -2,13 +2,12 @@ title: "Set Display for Performance" description: "" --- -```json -"WPFTweaksDisplay": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=1542} + "WPFTweaksDisplay": { "Content": "Set Display for Performance", "Description": "Sets the system preferences to performance. You can do this manually with sysdm.cpl as well.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a030_", "registry": [ { "Path": "HKCU:\\Control Panel\\Desktop", @@ -80,13 +79,6 @@ description: "" "Value": "0", "Type": "DWord" }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "OriginalValue": "1", - "Name": "TaskbarDa", - "Value": "0", - "Type": "DWord" - }, { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", "OriginalValue": "1", @@ -111,6 +103,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/EdgeDebloat.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/EdgeDebloat.md index 3e2d8e88..d38d3b77 100644 --- a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/EdgeDebloat.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/EdgeDebloat.md @@ -1,14 +1,13 @@ --- -title: "Debloat Edge" +title: "Edge Debloat" description: "" --- -```json -"WPFTweaksEdgeDebloat": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=1178} + "WPFTweaksEdgeDebloat": { "Content": "Edge Debloat", "Description": "Disables various telemetry options, popups, and other annoyances in Edge.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a026_", "registry": [ { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\EdgeUpdate", @@ -24,6 +23,13 @@ description: "" "Value": "0", "OriginalValue": "" }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", + "Name": "ofefcgjbeghpigppfmkologfjadafddi", + "Type": "String", + "Value": "1", + "OriginalValue": "" + }, { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", "Name": "ShowRecommendationsEnabled", @@ -118,9 +124,8 @@ description: "" ], ``` - - ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Essential-Tweaks/IPv46.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/IPv46.md similarity index 90% rename from docs/content/dev/tweaks/Essential-Tweaks/IPv46.md rename to docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/IPv46.md index 54eb026a..4159578f 100644 --- a/docs/content/dev/tweaks/Essential-Tweaks/IPv46.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/IPv46.md @@ -2,13 +2,12 @@ title: "Prefer IPv4 over IPv6" description: "" --- -```json -"WPFTweaksIPv46": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=2060} + "WPFTweaksIPv46": { "Content": "Prefer IPv4 over IPv6", "Description": "To set the IPv4 preference can have latency and security benefits on private networks where IPv6 is not configured.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a027_", "registry": [ { "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters", @@ -21,6 +20,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/OOSUbutton.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/OOSUbutton.md index 021734d7..1edf1dc7 100644 --- a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/OOSUbutton.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/OOSUbutton.md @@ -2,7 +2,7 @@ title: "Run OO Shutup 10" description: "" --- -```powershell +```powershell {filename="functions/public/Invoke-WPFOOSU.ps1",linenos=inline,linenostart=1} function Invoke-WPFOOSU { <# .SYNOPSIS @@ -23,8 +23,3 @@ function Invoke-WPFOOSU { } } ``` - -## Registry Changes -Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. - -You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RazerBlock.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RazerBlock.md index 83aa76dd..736746ed 100644 --- a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RazerBlock.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RazerBlock.md @@ -2,14 +2,12 @@ title: "Block Razer Software Installs" description: "" --- - -```json +```json {filename="config/tweaks.json",linenos=inline,linenostart=1917} "WPFTweaksRazerBlock": { "Content": "Block Razer Software Installs", "Description": "Blocks ALL Razer Software installations. The hardware works fine without any software. WARNING: this will also block all Windows third-party driver installations.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a021_", "registry": [ { "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DriverSearching", diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveCopilot.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveCopilot.md new file mode 100644 index 00000000..0d0a5b9c --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveCopilot.md @@ -0,0 +1,95 @@ +--- +title: "Disable Microsoft Copilot" +description: "" +--- +```json {filename="config/tweaks.json",linenos=inline,linenostart=1816} + "WPFTweaksRemoveCopilot": { + "Content": "Disable Microsoft Copilot", + "Description": "Disables MS Copilot AI built into Windows since 23H2.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "registry": [ + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsCopilot", + "Name": "TurnOffWindowsCopilot", + "Type": "DWord", + "Value": "1", + "OriginalValue": "" + }, + { + "Path": "HKCU:\\Software\\Policies\\Microsoft\\Windows\\WindowsCopilot", + "Name": "TurnOffWindowsCopilot", + "Type": "DWord", + "Value": "1", + "OriginalValue": "" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", + "Name": "ShowCopilotButton", + "Type": "DWord", + "Value": "0", + "OriginalValue": "1" + }, + { + "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Shell\\Copilot", + "Name": "IsCopilotAvailable", + "Type": "DWord", + "Value": "0", + "OriginalValue": "" + }, + { + "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Shell\\Copilot", + "Name": "CopilotDisabledReason", + "Type": "String", + "Value": "IsEnabledForGeographicRegionFailed", + "OriginalValue": "" + }, + { + "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\WindowsCopilot", + "Name": "AllowCopilotRuntime", + "Type": "DWord", + "Value": "0", + "OriginalValue": "" + }, + { + "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Blocked", + "Name": "{CB3B0003-8088-4EDE-8769-8B354AB2FF8C}", + "Type": "String", + "Value": "", + "OriginalValue": "" + }, + { + "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Shell\\Copilot\\BingChat", + "Name": "IsUserEligible", + "Type": "DWord", + "Value": "0", + "OriginalValue": "" + } + ], + "InvokeScript": [ + " + Write-Host \"Remove Copilot\" + Get-AppxPackage -AllUsers *Copilot* | Remove-AppxPackage -AllUsers + Get-AppxPackage -AllUsers Microsoft.MicrosoftOfficeHub | Remove-AppxPackage -AllUsers + + $Appx = (Get-AppxPackage *MicrosoftWindows.Client.CoreAI*).PackageFullName + if ($Appx) { + $Sid = (Get-LocalUser $Env:UserName).Sid.Value + New-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Appx\\AppxAllUserStore\\EndOfLife\\$Sid\\$Appx\" -Force + Remove-AppxPackage $Appx + } + " + ], + "UndoScript": [ + " + Write-Host \"Install Copilot\" + winget install --name Copilot --source msstore --accept-package-agreements --accept-source-agreements --silent + " + ], +``` + +## Registry Changes + +Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. + +You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveEdge.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveEdge.md index 70968572..b51aed27 100644 --- a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveEdge.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveEdge.md @@ -2,14 +2,12 @@ title: "Remove Microsoft Edge" description: "" --- -# Json File -```json +```json {filename="config/tweaks.json",linenos=inline,linenostart=1437} "WPFTweaksRemoveEdge": { "Content": "Remove Microsoft Edge", "Description": "Unblocks Microsoft Edge uninstaller restrictions than uses that uninstaller to remove Microsoft Edge", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a028_", "InvokeScript": [ "Invoke-WinUtilRemoveEdge" ], @@ -20,13 +18,3 @@ description: "" " ], ``` -# Function -```powershell -function Invoke-WinUtilRemoveEdge { - Write-Host "Unlocking The Offical Edge Uninstaller And Removing Microsoft Edge..." - - $Path = (Get-ChildItem "C:\Program Files (x86)\Microsoft\Edge\Application\*\Installer\setup.exe")[0].FullName - New-Item "C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe" -Force - Start-Process $Path -ArgumentList '--uninstall --system-level --force-uninstall --delete-profile' -} -``` diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveGallery.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveGallery.md index ca5253c4..aa7d2633 100644 --- a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveGallery.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveGallery.md @@ -2,13 +2,12 @@ title: "Remove Gallery from explorer" description: "" --- -```json -"WPFTweaksRemoveGallery": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=1525} + "WPFTweaksRemoveGallery": { "Content": "Remove Gallery from explorer", "Description": "Removes the Gallery from Explorer and sets This PC as default", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a029_", "InvokeScript": [ " Remove-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\" @@ -20,8 +19,3 @@ description: "" " ], ``` - -## Registry Changes -Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. - -You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveHome.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveHome.md index f9fc8bb8..de97c71e 100644 --- a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveHome.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveHome.md @@ -1,14 +1,13 @@ --- -title: "Remove Home from explorer" +title: "Remove Home from Explorer" description: "" --- -```json -"WPFTweaksRemoveHome": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=1506} + "WPFTweaksRemoveHome": { "Content": "Remove Home from Explorer", "Description": "Removes the Home from Explorer and sets This PC as default", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a029_", "InvokeScript": [ " Remove-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}\" @@ -22,8 +21,3 @@ description: "" " ], ``` - -## Registry Changes -Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. - -You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveOneDrive.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveOneDrive.md index 83b95a50..35ad7d91 100644 --- a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveOneDrive.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveOneDrive.md @@ -2,14 +2,12 @@ title: "Remove OneDrive" description: "" --- - -```json +```json {filename="config/tweaks.json",linenos=inline,linenostart=1469} "WPFTweaksRemoveOneDrive": { "Content": "Remove OneDrive", "Description": "Denys permission to remove onedrive user files than uses its own uninstaller to remove it than brings back permissions", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a029_", "InvokeScript": [ " # Deny permission to remove OneDrive folder diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RightClickMenu.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RightClickMenu.md index bf91f65d..059e01b7 100644 --- a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RightClickMenu.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RightClickMenu.md @@ -1,14 +1,13 @@ --- -title: "Set Classic Right-Click Menu" +title: "Set Classic Right-Click Menu " description: "" --- -```json -"WPFTweaksRightClickMenu": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=2012} + "WPFTweaksRightClickMenu": { "Content": "Set Classic Right-Click Menu ", "Description": "Great Windows 11 tweak to bring back good context menus when right clicking things in explorer.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a030_", "InvokeScript": [ " New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name \"InprocServer32\" -force -value \"\" @@ -25,8 +24,3 @@ description: "" " ], ``` - -## Registry Changes -Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. - -You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/Essential-Tweaks/Storage.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Storage.md similarity index 89% rename from docs/content/dev/tweaks/Essential-Tweaks/Storage.md rename to docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Storage.md index ead0fa89..d37eacc4 100644 --- a/docs/content/dev/tweaks/Essential-Tweaks/Storage.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Storage.md @@ -2,13 +2,12 @@ title: "Disable Storage Sense" description: "" --- -```json -"WPFTweaksStorage": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=1800} + "WPFTweaksStorage": { "Content": "Disable Storage Sense", "Description": "Storage Sense deletes temp files automatically.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a025_", "registry": [ { "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy", @@ -21,6 +20,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Teredo.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Teredo.md index c4ee7c01..0bfb7edb 100644 --- a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Teredo.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Teredo.md @@ -2,13 +2,12 @@ title: "Disable Teredo" description: "" --- -```json -"WPFTweaksTeredo": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=2076} + "WPFTweaksTeredo": { "Content": "Disable Teredo", "Description": "Teredo network tunneling is a ipv6 feature that can cause additional latency, but may cause problems with some games", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a024_", "registry": [ { "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters", @@ -18,9 +17,16 @@ description: "" "Type": "DWord" } ], + "InvokeScript": [ + "netsh interface teredo set state disabled" + ], + "UndoScript": [ + "netsh interface teredo set state default" + ], ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/UTC.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/UTC.md index eeea9ed4..84225703 100644 --- a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/UTC.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/UTC.md @@ -2,18 +2,17 @@ title: "Set Time to UTC (Dual Boot)" description: "" --- -```json -"WPFTweaksUTC": { +```json {filename="config/tweaks.json",linenos=inline,linenostart=1453} + "WPFTweaksUTC": { "Content": "Set Time to UTC (Dual Boot)", "Description": "Essential for computers that are dual booting. Fixes the time sync with Linux Systems.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a030_", "registry": [ { "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation", "Name": "RealTimeIsUniversal", - "Type": "DWord", + "Type": "QWord", "Value": "1", "OriginalValue": "0" } @@ -21,6 +20,7 @@ description: "" ``` ## Registry Changes + Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/XboxRemoval.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/XboxRemoval.md index 9fac8bff..c5337498 100644 --- a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/XboxRemoval.md +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/XboxRemoval.md @@ -2,14 +2,12 @@ title: "Remove Xbox & Gaming Components" description: "" --- - -```json +```json {filename="config/tweaks.json",linenos=inline,linenostart=1641} "WPFTweaksXboxRemoval": { "Content": "Remove Xbox & Gaming Components", "Description": "Removes Xbox services, the Xbox app, Game Bar, and related authentication components.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a028_", "appx": [ "Microsoft.XboxIdentityProvider", "Microsoft.XboxSpeechToTextOverlay", diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/changedns.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/changedns.md new file mode 100644 index 00000000..9545c7ca --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/changedns.md @@ -0,0 +1,12 @@ +--- +title: "DNS" +description: "" +--- +```json {filename="config/tweaks.json",linenos=inline,linenostart=2591} + "WPFchangedns": { + "Content": "DNS", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "Type": "Combobox", + "ComboItems": "Default DHCP Google Cloudflare Cloudflare_Malware Cloudflare_Malware_Adult Open_DNS Quad9 AdGuard_Ads_Trackers AdGuard_Ads_Trackers_Malware_Adult", +``` diff --git a/docs/go.mod b/docs/go.mod index 2b7646d3..06806674 100644 --- a/docs/go.mod +++ b/docs/go.mod @@ -2,4 +2,4 @@ module github.com/ChrisTitusTech/WinUtil go 1.23.3 -require github.com/imfing/hextra v0.9.7 // indirect +require github.com/imfing/hextra v0.11.1 // indirect diff --git a/docs/go.sum b/docs/go.sum index 8501da6f..d49a8e92 100644 --- a/docs/go.sum +++ b/docs/go.sum @@ -1,2 +1,4 @@ github.com/imfing/hextra v0.9.7 h1:Zg5n24us36Bn/S/5mEUPkRW6uwE6vHHEqWSgN0bPXaM= github.com/imfing/hextra v0.9.7/go.mod h1:cEfel3lU/bSx7lTE/+uuR4GJaphyOyiwNR3PTqFTXpI= +github.com/imfing/hextra v0.11.1 h1:8pTc4ReYbzGTHAnyiebmlT3ijFfIXiGu1r7tM/UGjFI= +github.com/imfing/hextra v0.11.1/go.mod h1:cEfel3lU/bSx7lTE/+uuR4GJaphyOyiwNR3PTqFTXpI= diff --git a/docs/hugo.toml b/docs/hugo.toml index 7936458f..85bfd44d 100644 --- a/docs/hugo.toml +++ b/docs/hugo.toml @@ -37,15 +37,20 @@ pageRef = "KnownIssues.md" weight = 4 [[menu.main]] -name = "Search" +name = "Store" +url = "https://christitus.com/downloads/" weight = 5 +[[menu.main]] +name = "Search" +weight = 6 + [menu.main.params] type = "search" [[menu.main]] name = "GitHub" -weight = 6 +weight = 7 url = "https://github.com/christitustech/Winutil" [menu.main.params] diff --git a/docs/i18n/en.yaml b/docs/i18n/en.yaml index 8c43263a..8d11d08a 100644 --- a/docs/i18n/en.yaml +++ b/docs/i18n/en.yaml @@ -1,4 +1,4 @@ -copyright: "© Chris Titus Tech. All rights reserved." +copyright: "© Chris Titus Tech. All rights reserved." backToTop: "Scroll to top" changeLanguage: "Change language" diff --git a/tools/devdocs-generator.ps1 b/tools/devdocs-generator.ps1 index 792f6581..955838be 100644 --- a/tools/devdocs-generator.ps1 +++ b/tools/devdocs-generator.ps1 @@ -1,644 +1,347 @@ <# .DESCRIPTION - This script generates markdown files for the development documentation based on the existing JSON files. - Create table of content and archive any files in the dev folder not modified by this script. - This script is not meant to be used manually, it is called by the github action workflow. + Generates Hugo-compatible markdown files for the development documentation + based on config/tweaks.json and config/feature.json. + Each JSON entry gets its own .md file with the raw JSON snippet or PowerShell function embedded. + Called by the GitHub Actions docs workflow before Hugo build. #> -function Process-MultilineStrings { - param ( - [Parameter(Mandatory, position=0)] - [string]$str - ) - - $lines = $str.Split("`r`n") - $count = $lines.Count - - # Loop through every line, expect last line in the string - # We'll add it after the for loop - for ($i = 0; $i -lt ($count - 1); $i++) { - $line = $lines[$i] - $processedStr += $line -replace ('^\s*\\\\', '') - # Add the previously removed NewLine character by 'Split' Method - $processedStr += "`r`n" - } - - # Add last line *without* a NewLine character. - $processedStr += $lines[$($count - 1)] -replace ('^\s*\\\\', '') - - return $processedStr -} - function Update-Progress { param ( [Parameter(Mandatory, position=0)] [string]$StatusMessage, - [Parameter(Mandatory, position=1)] [ValidateRange(0,100)] - [int]$Percent, - - [Parameter(position=2)] - [string]$Activity = "Compiling" + [int]$Percent ) - - Write-Progress -Activity $Activity -Status $StatusMessage -PercentComplete $Percent + Write-Progress -Activity "Generating Dev Docs" -Status $StatusMessage -PercentComplete $Percent } -function Load-Functions { - param ( - [Parameter(Mandatory, position=0)] - [string]$dir - ) - - Get-ChildItem -Path $dir -Filter *.ps1 | ForEach-Object { - $functionName = $_.BaseName - $functionContent = Get-Content -Path $_.FullName -Raw - $functions[$functionName] = $functionContent - } -} - -function Get-CalledFunctions { - param ( - [Parameter(Mandatory, position=0)] - $scriptContent, - - [Parameter(Mandatory, position=1)] - [hashtable]$functionList, - - [Parameter(Mandatory, position=2)] - [ref]$processedFunctions - ) - - $calledFunctions = @() - foreach ($functionName in $functionList.Keys) { - if ($scriptContent -match "\b$functionName\b" -and -not $processedFunctions.Value.Contains($functionName)) { - $calledFunctions += $functionName - $processedFunctions.Value.Add($functionName) - if ($functionList[$functionName]) { - $nestedFunctions = Get-CalledFunctions -scriptContent $functionList[$functionName] -functionList $functionList -processedFunctions $processedFunctions - $calledFunctions += $nestedFunctions - } - } - } - return $calledFunctions -} - -function Get-AdditionalFunctionsFromToggle { - param ( - [Parameter(Mandatory, position=0)] - [string]$buttonName - ) - - $invokeWpfToggleContent = Get-Content -Path "$publicFunctionsDir/Invoke-WPFToggle.ps1" -Raw - $lines = $invokeWpfToggleContent -split "`r`n" - foreach ($line in $lines) { - if ($line -match "`"$buttonName`" \{Invoke-(WinUtil[a-zA-Z]+)") { - return $matches[1] - } - } -} - -function Get-AdditionalFunctionsFromButton { - param ( - [Parameter(Mandatory, position=0)] - [string]$buttonName - ) - - $invokeWpfButtonContent = Get-Content -Path "$publicFunctionsDir/Invoke-WPFButton.ps1" -Raw - $lines = $invokeWpfButtonContent -split "`r`n" - foreach ($line in $lines) { - if ($line -match "`"$buttonName`" \{Invoke-(WPF[a-zA-Z]+)") { - return $matches[1] - } - } -} - -function Add-LinkAttribute { +function Get-RawJsonBlock { + <# + .SYNOPSIS + Extracts the raw JSON text for a specific item from a JSON file's lines. + Returns the line number and raw text, excluding the "link" property and closing brace. + #> param ( [Parameter(Mandatory)] - [PSCustomObject]$jsonObject + [string]$ItemName, + [Parameter(Mandatory)] + [AllowEmptyString()] + [string[]]$JsonLines ) - $totalProperties = ($jsonObject.PSObject.Properties | Measure-Object).Count - $progressIncrement = 50 / $totalProperties - $currentProgress = 50 + $escapedName = [regex]::Escape($ItemName) + $startIndex = -1 + $startIndent = "" - foreach ($property in $jsonObject.PSObject.Properties) { - if ($property.Value -is [PSCustomObject]) { - Add-LinkAttribute -jsonObject $property.Value - } elseif ($property.Value -is [System.Collections.ArrayList]) { - foreach ($item in $property.Value) { - if ($item -is [PSCustomObject]) { - Add-LinkAttribute -jsonObject $item - } - } + # Find the line containing "ItemName": { + for ($i = 0; $i -lt $JsonLines.Count; $i++) { + if ($JsonLines[$i] -match "^(\s*)`"$escapedName`"\s*:\s*\{") { + $startIndex = $i + $startIndent = $matches[1] + break } - $currentProgress += $progressIncrement - $roundedProgress = [math]::Round($currentProgress) - Update-Progress -StatusMessage "Adding documentation links" -Percent $roundedProgress } - if ($jsonObject -ne $global:rootObject) { - $jsonObject | Add-Member -NotePropertyName "link" -NotePropertyValue "" -Force + + if ($startIndex -eq -1) { + Write-Warning "Could not find '$ItemName' in JSON" + return $null + } + + # Find the closing } at the same indentation level + $escapedIndent = [regex]::Escape($startIndent) + $endIndex = -1 + for ($i = ($startIndex + 1); $i -lt $JsonLines.Count; $i++) { + if ($JsonLines[$i] -match "^$escapedIndent\}") { + $endIndex = $i + break + } + } + + if ($endIndex -eq -1) { + Write-Warning "Could not find closing brace for '$ItemName'" + return $null + } + + # Walk backwards from closing brace to exclude "link" property and empty lines + $lastContentIndex = $endIndex - 1 + while ($lastContentIndex -gt $startIndex) { + $trimmed = $JsonLines[$lastContentIndex].Trim() + if ($trimmed -eq "" -or $trimmed -match '^"link"') { + $lastContentIndex-- + } else { + break + } + } + + $rawLines = $JsonLines[$startIndex..$lastContentIndex] + $rawText = $rawLines -join "`r`n" + + return @{ + LineNumber = $startIndex + 1 # 1-based + RawText = $rawText } } -function Generate-MarkdownFiles { +function Get-ButtonFunctionMapping { + <# + .SYNOPSIS + Parses Invoke-WPFButton.ps1 to build a hashtable mapping button names to function names. + #> param ( - [Parameter(Mandatory, position=0)] - [PSCustomObject]$data, - - [Parameter(Mandatory, position=1)] - [string]$outputDir, - - [Parameter(Mandatory, position=2)] - [string]$jsonFilePath, - - [Parameter(Mandatory, position=3)] - [string]$lastModified, - - [Parameter(Mandatory, position=4)] - [string]$type, - - [Parameter(position=5)] - [int]$initialProgress + [Parameter(Mandatory)] + [string]$ButtonFilePath ) - # TODO: Make the function reference generation better by making a Graph, so it highlights - # Which function "depends" on which, and makes it clearer on a high-level for the reader - # to understand the general structure. - - $totalItems = ($data.PSObject.Properties | Measure-Object).Count - $progressIncrement = 10 / $totalItems - $currentProgress = [int]$initialProgress - - $tocEntries = @() - $processedFiles = @() - foreach ($itemName in $data.PSObject.Properties.Name) { - # Create Category Directory if needed. - $itemDetails = $data.$itemName - $category = $itemDetails.category -replace '[^a-zA-Z0-9]', '-' - $categoryDir = "$outputDir/$category" - if (-Not (Test-Path -Path $categoryDir)) { - New-Item -ItemType Directory -Path $categoryDir | Out-Null - } - - # Create empty files with correct path - $fullItemName = $itemName - $displayName = $itemName -replace $itemnametocut, '' - $filename = "$categoryDir/$displayName.md" - $relativePath = "$outputDir/$category/$displayName.md" -replace '^docs/', '' - if (-Not (Test-Path -Path $filename)) { - Set-Content -Path $filename -Value "" -Encoding utf8 - } - - # Add the entry to 'tocEntries' so we can generate Table Of Content easily - # And add the Full FileName of entry - $tocEntries += @{ - Category = $category - Path = $relativePath - Name = $itemDetails.Content - Type = $type - } - $processedFiles += (Get-Item $filename).FullName - - $header = "# $([string]$itemDetails.Content)" + "`r`n" - $lastUpdatedNotice = "Last Updated: $lastModified" + "`r`n" - $autoupdatenotice = Process-MultilineStrings @" - \\!!! info - \\ The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.** -"@ - - $description = Process-MultilineStrings @" - \\## Description - \\ - \\$([string]$itemDetails.Description) -"@ - - $jsonContent = ($itemDetails | ConvertTo-Json -Depth 10).replace('\n',"`n").replace('\r', "`r") - $codeBlock = Process-MultilineStrings @" - \\
- \\Preview Code - \\ - \\``````json - \\$jsonContent - \\`````` - \\ - \\
-"@ - - # Clear the variable before continuing, will cause problems otherwise - $FeaturesDocs = "" - if ($itemDetails.feature) { - $FeaturesDocs += Process-MultilineStrings @" - \\## Features - \\ - \\ - \\Optional Windows Features are additional functionalities or components in the Windows operating system that users can choose to enable or disable based on their specific needs and preferences. - \\ - \\ - \\You can find information about Optional Windows Features on [Microsoft's Website for Optional Features](https://learn.microsoft.com/en-us/windows/client-management/client-tools/add-remove-hide-features?pivots=windows-11). - \\ - \\ -"@ - if (($itemDetails.feature).Count -gt 1) { - $FeaturesDocs += "### Features to install" + "`r`n" - } else { - $FeaturesDocs += "### Feature to install" + "`r`n" - } - foreach ($feature in $itemDetails.feature) { - $FeaturesDocs += "- $($feature)" + "`r`n" - } - } - - # Clear the variable before continuing, will cause problems otherwise - $InvokeScript = "" - if ($itemDetails.InvokeScript) { - $InvokeScriptContent = $itemDetails.InvokeScript | Out-String - $InvokeScript = Process-MultilineStrings @" - \\## Invoke Script - \\ - \\``````powershell - \\$InvokeScriptContent - \\`````` -"@ - } - - # Clear the variable before continuing, will cause problems otherwise - $UndoScript = "" - if ($itemDetails.UndoScript) { - $UndoScriptContent = $itemDetails.UndoScript | Out-String - $UndoScript = Process-MultilineStrings @" - \\## Undo Script - \\ - \\``````powershell - \\$UndoScriptContent - \\`````` -"@ - } - - # Clear the variable before continuing, will cause problems otherwise - $ToggleScript = "" - if ($itemDetails.ToggleScript) { - $ToggleScriptContent = $itemDetails.ToggleScript | Out-String - $ToggleScript = Process-MultilineStrings @" - \\## Toggle Script - \\ - \\``````powershell - \\$ToggleScriptContent - \\`````` -"@ - } - - # Clear the variable before continuing, will cause problems otherwise - $ButtonScript = "" - if ($itemDetails.ButtonScript) { - $ButtonScriptContent = $itemDetails.ButtonScript | Out-String - $ButtonScript = Process-MultilineStrings @" - \\## Button Script - \\ - \\``````powershell - \\$ButtonScriptContent - \\`````` -"@ - } - - # Clear the variable before continuing, will cause problems otherwise - $FunctionDetails = "" - $processedFunctions = New-Object 'System.Collections.Generic.HashSet[System.String]' - $allScripts = @($itemDetails.InvokeScript, $itemDetails.UndoScript, $itemDetails.ToggleScript, $itemDetails.ButtonScript) - foreach ($script in $allScripts) { - if ($script) { - $calledFunctions = Get-CalledFunctions -scriptContent $script -functionList $functions -processedFunctions ([ref]$processedFunctions) - foreach ($functionName in $calledFunctions) { - if ($functions.ContainsKey($functionName)) { - $FunctionDetails += Process-MultilineStrings @" - \\## Function: $functionName - \\ - \\``````powershell - \\$($functions[$functionName]) - \\`````` - \\ -"@ - } - } - } - } - - $additionalFunctionToggle = Get-AdditionalFunctionsFromToggle -buttonName $fullItemName - if ($additionalFunctionToggle) { - $additionalFunctionNameToggle = "Invoke-$additionalFunctionToggle" - if ($functions.ContainsKey($additionalFunctionNameToggle) -and -not $processedFunctions.Contains($additionalFunctionNameToggle)) { - $FunctionDetails += Process-MultilineStrings @" - \\## Function: $additionalFunctionNameToggle - \\ - \\``````powershell - \\$($functions[$additionalFunctionNameToggle]) - \\`````` - \\ -"@ - $processedFunctions.Add($additionalFunctionNameToggle) - } - } - - $additionalFunctionButton = Get-AdditionalFunctionsFromButton -buttonName $fullItemName - if ($additionalFunctionButton) { - $additionalFunctionNameButton = "Invoke-$additionalFunctionButton" - if ($functions.ContainsKey($additionalFunctionNameButton) -and -not $processedFunctions.Contains($additionalFunctionNameButton)) { - $FunctionDetails += Process-MultilineStrings @" - \\## Function: $additionalFunctionNameButton - \\ - \\``````powershell - \\$($functions[$additionalFunctionNameButton]) - \\`````` - \\ -"@ - $processedFunctions.Add($additionalFunctionNameButton) - } - } - - # Clear the variable before continuing, will cause problems otherwise - $registryDocs = "" - if ($itemDetails.registry) { - $registryDocs += Process-MultilineStrings @" - \\## Registry Changes - \\Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place. - \\ - \\ - \\You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry). - \\ - \\ -"@ - foreach ($regEntry in $itemDetails.registry) { - $registryDocs += Process-MultilineStrings @" - \\### Registry Key: $($regEntry.Name) - \\ - \\**Type:** $($regEntry.Type) - \\ - \\**Original Value:** $($regEntry.OriginalValue) - \\ - \\**New Value:** $($regEntry.Value) - \\ - \\ -"@ - } - } - - # Clear the variable before continuing, will cause problems otherwise - $serviceDocs = "" - if ($itemDetails.service) { - $serviceDocs = Process-MultilineStrings @" - \\## Service Changes - \\ - \\Windows services are background processes for system functions or applications. Setting some to manual optimizes performance by starting them only when needed. - \\ - \\You can find information about services on [Wikipedia](https://www.wikiwand.com/en/Windows_service) and [Microsoft's Website](https://learn.microsoft.com/en-us/dotnet/framework/windows-services/introduction-to-windows-service-applications). - \\ - \\ -"@ - foreach ($service in $itemDetails.service) { - $serviceDocs += Process-MultilineStrings @" - \\### Service Name: $($service.Name) - \\ - \\**Startup Type:** $($service.StartupType) - \\ - \\**Original Type:** $($service.OriginalType) - \\ - \\ -"@ - } - } - - # Clear the variable before continuing, will cause problems otherwise - $scheduledTaskDocs = "" - if ($itemDetails.ScheduledTask) { - $scheduledTaskDocs = Process-MultilineStrings @" - \\## Scheduled Task Changes - \\ - \\Windows scheduled tasks are used to run scripts or programs at specific times or events. Disabling unnecessary tasks can improve system performance and reduce unwanted background activity. - \\ - \\ - \\You can find information about scheduled tasks on [Wikipedia](https://www.wikiwand.com/en/Windows_Task_Scheduler) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/desktop/taskschd/about-the-task-scheduler). - \\ - \\ -"@ - foreach ($task in $itemDetails.ScheduledTask) { - $scheduledTaskDocs += Process-MultilineStrings @" - \\### Task Name: $($task.Name) - \\ - \\**State:** $($task.State) - \\ - \\**Original State:** $($task.OriginalState) - \\ - \\ -"@ - } - } - - $jsonLink = "[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/$jsonFilePath)" - $customContentStartTag = "" - $customContentEndTag = "" - $secondCustomContentStartTag = "" - $secondCustomContentEndTag = "" - - if (Test-Path -Path "$filename") { - $existingContent = Get-Content -Path "$filename" -Raw - $customContentPattern = "(?s)$customContentStartTag(.*?)$customContentEndTag" - $secondCustomContentPattern = "(?s)$secondCustomContentStartTag(.*?)$secondCustomContentEndTag" - if ($existingContent -match $customContentPattern) { - $customContent = $matches[1].Trim() - } - if ($existingContent -match $secondCustomContentPattern) { - $secondCustomContent = $matches[1].Trim() - } - } - - $fileContent = Process-MultilineStrings @" - \\$header - \\$lastUpdatedNotice - \\ - \\$autoupdatenotice - \\$( if ($itemDetails.Description) { $description } ) - \\ - \\$customContentStartTag - \\$customContent - \\$customContentEndTag - \\ - \\$codeBlock - \\ - \\$( - if ($FeaturesDocs) { $FeaturesDocs + "`r`n" } - if ($itemDetails.InvokeScript) { $InvokeScript + "`r`n" } - if ($itemDetails.UndoScript) { $UndoScript + "`r`n" } - if ($itemDetails.ToggleScript) { $ToggleScript + "`r`n" } - if ($itemDetails.ButtonScript) { $ButtonScript + "`r`n" } - if ($FunctionDetails) { $FunctionDetails + "`r`n" } - if ($itemDetails.registry) { $registryDocs + "`r`n" } - if ($itemDetails.service) { $serviceDocs + "`r`n" } - if ($itemDetails.ScheduledTask) { $scheduledTaskDocs + "`r`n" } - ) - \\$secondCustomContentStartTag - \\$secondCustomContent - \\$secondCustomContentEndTag - \\ - \\ - \\$jsonLink -"@ - - Set-Content -Path "$filename" -Value "$fileContent" -Encoding utf8 - - # TODO: For whatever reason, some headers have a space before them, - # so as a temporary fix.. we'll remove these it so mkdocs can render properly - (Get-Content -Raw -Path "$filename").Replace(' ##', '##') | Set-Content "$filename" - $currentProgress += $progressIncrement - $roundedProgress = [math]::Round($currentProgress) - Update-Progress -StatusMessage "Generating content for documentation" -Percent $roundedProgress - } - - return [PSCustomObject]@{ - TocEntries = $tocEntries - ProcessedFiles = $processedFiles - } -} - -function Generate-TypeSectionContent { - param ( - [array]$entries - ) - - $totalEntries = $entries.Count - $progressIncrement = 10 / $totalEntries - $currentProgress = 90 - - $sectionContent = "" - $categories = @{} - foreach ($entry in $entries) { - if (-Not $categories.ContainsKey($entry.Category)) { - $categories[$entry.Category] = @() - } - $categories[$entry.Category] += $entry - - $currentProgress += $progressIncrement - $roundedProgress = [math]::Round($currentProgress) - Update-Progress -StatusMessage "Generating table of contents" -Percent $roundedProgress - } - foreach ($category in $categories.Keys) { - $sectionContent += "### $category`r`n`r`n" - foreach ($entry in $categories[$category]) { - $sectionContent += "- [$($entry.Name)]($($entry.Path))`r`n" + $mapping = @{} + $lines = Get-Content -Path $ButtonFilePath + foreach ($line in $lines) { + if ($line -match '^\s*"(\w+)"\s*\{(Invoke-\w+)') { + $mapping[$matches[1]] = $matches[2] } } - return $sectionContent + return $mapping } function Add-LinkAttributeToJson { + <# + .SYNOPSIS + Updates the "link" property on each top-level entry in a JSON config file + to point to the corresponding documentation page URL. + #> param ( - [string]$jsonFilePath, - [string]$outputDir + [Parameter(Mandatory)] + [string]$JsonFilePath, + [Parameter(Mandatory)] + [string]$UrlPrefix, + [Parameter(Mandatory)] + [string]$ItemNameToCut ) - $jsonText = Get-Content -Path $jsonFilePath -Raw + $jsonText = Get-Content -Path $JsonFilePath -Raw $jsonData = $jsonText | ConvertFrom-Json - $totalItems = ($jsonData.PSObject.Properties | Measure-Object).Count - $progressIncrement = 20 / $totalItems - $currentProgress = 70 - foreach ($item in $jsonData.PSObject.Properties) { $itemName = $item.Name $itemDetails = $item.Value $category = $itemDetails.category -replace '[^a-zA-Z0-9]', '-' - $displayName = $itemName -replace "$itemnametocut", '' - $relativePath = "$outputDir/$category/$displayName" -replace '^docs/', '' - $docLink = "https://christitustech.github.io/winutil/$relativePath" - $jsonData.$itemName.link = $docLink + $displayName = $itemName -replace $ItemNameToCut, '' + $docLink = "$UrlPrefix/$($category.ToLower())/$($displayName.ToLower())" - $currentProgress += $progressIncrement - $roundedProgress = [math]::Round($currentProgress) - Update-Progress -StatusMessage "Adding documentation links to JSON" -Percent $roundedProgress + $itemDetails | Add-Member -NotePropertyName "link" -NotePropertyValue $docLink -Force } - $jsonText = ($jsonData | ConvertTo-Json -Depth 10).replace('\n',"`n").replace('\r', "`r") - Set-Content -Path $jsonFilePath -Value ($jsonText) -Encoding utf8 + $jsonText = ($jsonData | ConvertTo-Json -Depth 100).replace('\n', "`n").replace('\r', "`r") + Set-Content -Path $JsonFilePath -Value $jsonText -Encoding utf8 } +# ============================================================================== +# Main Script +# ============================================================================== + +# Use PSScriptRoot if available (running as a script file), otherwise assume CWD is tools/ +$scriptDir = if ($PSScriptRoot) { $PSScriptRoot } else { (Get-Location).Path } +$repoRoot = Resolve-Path "$scriptDir/.." + +# Paths +$tweaksJsonPath = "$repoRoot/config/tweaks.json" +$featuresJsonPath = "$repoRoot/config/feature.json" +$tweaksOutputDir = "$repoRoot/docs/content/dev/tweaks" +$featuresOutputDir = "$repoRoot/docs/content/dev/features" +$publicFunctionsDir = "$repoRoot/functions/public" +$privateFunctionsDir = "$repoRoot/functions/private" + +$itemnametocut = 'WPF(WinUtil|Toggle|Features?|Tweaks?|Panel|Fix(es)?)?' +$baseUrl = "https://winutil.christitus.com" + +# Categories that should have generated documentation +$documentedCategories = @( + "Essential Tweaks", + "z__Advanced Tweaks - CAUTION", + "Customize Preferences", + "Performance Plans", + "Features", + "Fixes", + "Legacy Windows Panels" +) + +# --- Load data --- + Update-Progress "Loading JSON files" 10 -$tweaks = Get-Content -Path "../config/tweaks.json" | ConvertFrom-Json -$features = Get-Content -Path "../config/feature.json" | ConvertFrom-Json +$tweaks = Get-Content -Path $tweaksJsonPath -Raw | ConvertFrom-Json +$features = Get-Content -Path $featuresJsonPath -Raw | ConvertFrom-Json -Update-Progress "Getting last modified dates of the JSON files" 20 -$tweaksLastModified = (Get-Item "../config/tweaks.json").LastWriteTime.ToString("yyyy-MM-dd") -$featuresLastModified = (Get-Item "../config/feature.json").LastWriteTime.ToString("yyyy-MM-dd") +# --- Load function files (content + relative path) --- -$tweaksOutputDir = "../docs/dev/tweaks" -$featuresOutputDir = "../docs/dev/features" -$privateFunctionsDir = "../functions/private" -$publicFunctionsDir = "../functions/public" -$functions = @{} -$itemnametocut = "WPF(WinUtil|Toggle|Features?|Tweaks?|Panel|Fix(es)?)?" - -Update-Progress "Creating Directories" 30 -if (-Not (Test-Path -Path $tweaksOutputDir)) { - New-Item -ItemType Directory -Path $tweaksOutputDir | Out-Null +Update-Progress "Loading function files" 20 +$functionFiles = @{} +Get-ChildItem -Path $publicFunctionsDir -Filter *.ps1 | ForEach-Object { + $functionFiles[$_.BaseName] = @{ + Content = (Get-Content -Path $_.FullName -Raw).TrimEnd() + RelativePath = "functions/public/$($_.Name)" + } } -if (-Not (Test-Path -Path $featuresOutputDir)) { - New-Item -ItemType Directory -Path $featuresOutputDir | Out-Null +Get-ChildItem -Path $privateFunctionsDir -Filter *.ps1 | ForEach-Object { + $functionFiles[$_.BaseName] = @{ + Content = (Get-Content -Path $_.FullName -Raw).TrimEnd() + RelativePath = "functions/private/$($_.Name)" + } } -Update-Progress "Loading existing Functions" 40 -Load-Functions -dir $privateFunctionsDir -Load-Functions -dir $publicFunctionsDir +# --- Build button-to-function mapping --- -Update-Progress "Adding documentation links to JSON files" 50 +Update-Progress "Building button-to-function mapping" 30 +$buttonFunctionMap = Get-ButtonFunctionMapping -ButtonFilePath "$publicFunctionsDir/Invoke-WPFButton.ps1" -# Define the JSON file paths -$jsonPaths = @("../config/feature.json", "../config/tweaks.json") +# --- Update link attributes in JSON files --- -# Loop through each JSON file path -foreach ($jsonPath in $jsonPaths) { - # Load the JSON content - $json = Get-Content -Raw -Path $jsonPath | ConvertFrom-Json +Update-Progress "Updating documentation links in JSON" 40 +Add-LinkAttributeToJson -JsonFilePath $tweaksJsonPath -UrlPrefix "$baseUrl/dev/tweaks" -ItemNameToCut $itemnametocut +Add-LinkAttributeToJson -JsonFilePath $featuresJsonPath -UrlPrefix "$baseUrl/dev/features" -ItemNameToCut $itemnametocut - # Set the global root object to the current json object - $global:rootObject = $json +# Reload JSON lines after link update (so line numbers are accurate) +$tweaksLines = Get-Content -Path $tweaksJsonPath +$featuresLines = Get-Content -Path $featuresJsonPath - # Add the "link" attribute to the JSON - Add-LinkAttribute -jsonObject $json +# ============================================================================== +# Clean up old generated .md files (keep _index.md) +# ============================================================================== - # Convert back to JSON with the original formatting - $jsonString = ($json | ConvertTo-Json -Depth 100).replace('\n',"`n").replace('\r', "`r") - - # Save the JSON back to the file - Set-Content -Path $jsonPath -Value $jsonString +Update-Progress "Cleaning up old generated docs" 45 +foreach ($dir in @($tweaksOutputDir, $featuresOutputDir)) { + Get-ChildItem -Path $dir -Recurse -Filter *.md | Where-Object { + $_.Name -ne "_index.md" + } | Remove-Item -Force } -Add-LinkAttributeToJson -jsonFilePath "../config/tweaks.json" -outputDir "dev/tweaks" -Add-LinkAttributeToJson -jsonFilePath "../config/feature.json" -outputDir "dev/features" +# ============================================================================== +# Generate Tweak Documentation +# ============================================================================== -Update-Progress "Generating content for documentation" 60 -$tweakResult = Generate-MarkdownFiles -data $tweaks -outputDir $tweaksOutputDir -jsonFilePath "../config/tweaks.json" -lastModified $tweaksLastModified -type "tweak" -initialProgress 60 -$featureResult = Generate-MarkdownFiles -data $features -outputDir $featuresOutputDir -jsonFilePath "../config/feature.json" -lastModified $featuresLastModified -type "feature" -initialProgress 70 +Update-Progress "Generating tweak documentation" 50 -Update-Progress "Generating table of contents" 80 -$allTocEntries = $tweakResult.TocEntries + $featureResult.TocEntries -$tweakEntries = ($allTocEntries).where{ $_.Type -eq 'tweak' } | Sort-Object Category, Name -$featureEntries = ($allTocEntries).where{ $_.Type -eq 'feature' } | Sort-Object Category, Name +$tweakNames = $tweaks.PSObject.Properties.Name +$totalTweaks = $tweakNames.Count +$tweakCount = 0 -$indexContent += Process-MultilineStrings @" - \\# Table of Contents - \\ - \\ - \\## Tweaks - \\ - \\ -"@ -$indexContent += $(Generate-TypeSectionContent $tweakEntries) + "`r`n" -$indexContent += Process-MultilineStrings @" - \\## Features - \\ - \\ -"@ -$indexContent += $(Generate-TypeSectionContent $featureEntries) + "`r`n" -Set-Content -Path "../docs/devdocs.md" -Value $indexContent -Encoding utf8 +foreach ($itemName in $tweakNames) { + $item = $tweaks.$itemName + $tweakCount++ + + if ($item.category -notin $documentedCategories) { continue } + + $category = $item.category -replace '[^a-zA-Z0-9]', '-' + $displayName = $itemName -replace $itemnametocut, '' + $categoryDir = "$tweaksOutputDir/$category" + $filename = "$categoryDir/$displayName.md" + + if (-Not (Test-Path -Path $categoryDir)) { + New-Item -ItemType Directory -Path $categoryDir | Out-Null + } + + # Hugo frontmatter + $title = $item.Content -replace '"', '\"' + $content = "---`r`ntitle: `"$title`"`r`ndescription: `"`"`r`n---`r`n" + + if ($item.Type -eq "Button") { + # Button-type tweak: embed the mapped PowerShell function + $funcName = $buttonFunctionMap[$itemName] + if ($funcName -and $functionFiles.ContainsKey($funcName)) { + $func = $functionFiles[$funcName] + $content += "``````powershell {filename=`"$($func.RelativePath)`",linenos=inline,linenostart=1}`r`n" + $content += $func.Content + "`r`n" + $content += "```````r`n" + } + } else { + # Standard tweak: embed raw JSON block + $jsonBlock = Get-RawJsonBlock -ItemName $itemName -JsonLines $tweaksLines + if ($jsonBlock) { + $content += "``````json {filename=`"config/tweaks.json`",linenos=inline,linenostart=$($jsonBlock.LineNumber)}`r`n" + $content += $jsonBlock.RawText + "`r`n" + $content += "```````r`n" + } + + # Registry Changes section + if ($item.registry) { + $content += "`r`n## Registry Changes`r`n`r`n" + $content += "Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.`r`n`r`n" + $content += "You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).`r`n" + } + + # Service function reference + if ($item.service -and $functionFiles.ContainsKey("Set-WinUtilService")) { + $svcFunc = $functionFiles["Set-WinUtilService"] + $content += "#Function`r`n" + $content += "``````powershell {filename=`"$($svcFunc.RelativePath)`",linenos=inline,linenostart=1}`r`n" + $content += $svcFunc.Content + "`r`n" + $content += "```````r`n" + } + } + + Set-Content -Path $filename -Value $content -Encoding utf8 -NoNewline + + $percent = 50 + [int](($tweakCount / $totalTweaks) * 20) + if ($percent -gt 70) { $percent = 70 } + Update-Progress "Generating tweak documentation ($tweakCount/$totalTweaks)" $percent +} + +# ============================================================================== +# Generate Feature Documentation +# ============================================================================== + +Update-Progress "Generating feature documentation" 70 + +$featureNames = $features.PSObject.Properties.Name +$totalFeatures = $featureNames.Count +$featureCount = 0 + +foreach ($itemName in $featureNames) { + $item = $features.$itemName + $featureCount++ + + if ($item.category -notin $documentedCategories) { continue } + + # Skip pure UI buttons that don't need docs + if ($itemName -eq "WPFFeatureInstall") { continue } + + $category = $item.category -replace '[^a-zA-Z0-9]', '-' + $displayName = $itemName -replace $itemnametocut, '' + $categoryDir = "$featuresOutputDir/$category" + $filename = "$categoryDir/$displayName.md" + + if (-Not (Test-Path -Path $categoryDir)) { + New-Item -ItemType Directory -Path $categoryDir | Out-Null + } + + $title = $item.Content -replace '"', '\"' + $content = "---`r`ntitle: `"$title`"`r`ndescription: `"`"`r`n---`r`n" + + if ($item.category -eq "Fixes" -or $item.category -eq "Legacy Windows Panels") { + # Embed the PowerShell function file + $funcName = $buttonFunctionMap[$itemName] + if ($funcName -and $functionFiles.ContainsKey($funcName)) { + $func = $functionFiles[$funcName] + $content += "``````powershell {filename=`"$($func.RelativePath)`",linenos=inline,linenostart=1}`r`n" + $content += $func.Content + "`r`n" + $content += "```````r`n" + } + } else { + # Features category: embed raw JSON block + $jsonBlock = Get-RawJsonBlock -ItemName $itemName -JsonLines $featuresLines + if ($jsonBlock) { + $content += "``````json {filename=`"config/feature.json`",linenos=inline,linenostart=$($jsonBlock.LineNumber)}`r`n" + $content += $jsonBlock.RawText + "`r`n" + $content += "```````r`n" + } + } + + Set-Content -Path $filename -Value $content -Encoding utf8 -NoNewline + + $percent = 70 + [int](($featureCount / $totalFeatures) * 20) + if ($percent -gt 90) { $percent = 90 } + Update-Progress "Generating feature documentation ($featureCount/$totalFeatures)" $percent +} Update-Progress "Process Completed" 100 +Write-Host "Documentation generation complete."