diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 891c6177..43426a8a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -4,24 +4,23 @@ about: Create a report to help us improve title: '' labels: '' assignees: '' - --- -**Describe the bug** +## Describe the bug A clear and concise description of what the bug is. -**To Reproduce** +## To Reproduce Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error -**Expected behavior** +## Expected behavior A clear and concise description of what you expected to happen. -**Screenshots** +## Screenshots If applicable, add screenshots to help explain your problem. -**Additional context** +## Additional context Add any other context about the problem here. diff --git a/.github/workflows/ci.yml b/.github/workflows/github-pages.yml similarity index 94% rename from .github/workflows/ci.yml rename to .github/workflows/github-pages.yml index 1e853399..815a32ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/github-pages.yml @@ -1,4 +1,4 @@ -name: ci +name: GitHub Pages Deploy on: push: branches: diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 0cc68253..b1d9e7e4 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -40,6 +40,8 @@ jobs: with: tag_name: ${{ steps.extract_version.outputs.version }} name: Pre-Release ${{ steps.extract_version.outputs.version }} + body: "![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/${{ steps.extract_version.outputs.version }}/winutil.ps1)" + append_body: true files: ./winutil.ps1 prerelease: true env: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6d59bb73..61085b64 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -36,6 +36,8 @@ jobs: with: tag_name: ${{ steps.extract_version.outputs.version }} name: Release ${{ steps.extract_version.outputs.version }} + body: "![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/${{ steps.extract_version.outputs.version }}/winutil.ps1)" + append_body: true files: ./winutil.ps1 prerelease: false make_latest: "true" diff --git a/.github/workflows/sponsors.yml b/.github/workflows/sponsors.yml new file mode 100644 index 00000000..06a6dab5 --- /dev/null +++ b/.github/workflows/sponsors.yml @@ -0,0 +1,25 @@ +name: Generate Sponsors README +on: + workflow_dispatch: + schedule: + - cron: 30 15 * * 0-6 +permissions: + contents: write +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v2 + + - name: Generate Sponsors 💖 + uses: JamesIves/github-sponsors-readme-action@v1 + with: + token: ${{ secrets.PAT }} + file: 'README.md' + + - name: Deploy to GitHub Pages 🚀 + uses: JamesIves/github-pages-deploy-action@v4 + with: + branch: main + folder: '.' \ No newline at end of file diff --git a/Compile.ps1 b/Compile.ps1 index a8bf570d..e5399475 100644 --- a/Compile.ps1 +++ b/Compile.ps1 @@ -56,12 +56,10 @@ Get-ChildItem .\config | Where-Object {$psitem.extension -eq ".json"} | ForEach- # Replace every XML Special Character so it'll render correctly in final build # Only do so if json files has content to be displayed (for example the applications, tweaks, features json files) - # Some Type Convertion using Casting and Cleaning Up of the convertion result using 'Replace' Method + # Make an Array List containing every name at first level of Json File $jsonAsObject = $json | convertfrom-json - $firstLevelJsonList = ([System.String]$jsonAsObject).split('=;') | ForEach-Object { - $_.Replace('=}','').Replace('@{','').Replace(' ','') - } - + $firstLevelJsonList = [System.Collections.ArrayList]::new() + $jsonAsObject.PSObject.Properties.Name | ForEach-Object {$null = $firstLevelJsonList.Add($_)} # Note: # Avoid using HTML Entity Codes, for example '”' (stands for "Right Double Quotation Mark"), # Use **HTML decimal/hex codes instead**, as using HTML Entity Codes will result in XML parse Error when running the compiled script. diff --git a/README.md b/README.md index 71fd1d31..be2b2fb0 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Chris Titus Tech's Windows Utility -[![Version](https://img.shields.io/github/v/release/ChrisTitusTech/winutil?color=7a39fb)](https://github.com/ChrisTitusTech/winutil/releases/latest) -![GitHub Downloads (all assets, latest release)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/latest/total) -[![](https://dcbadge.limes.pink/api/server/https://discord.gg/RUbZUZyByQ)](https://discord.gg/RUbZUZyByQ) +[![Version](https://img.shields.io/github/v/release/ChrisTitusTech/winutil?color=%230567ff&label=Latest%20Release&style=for-the-badge)](https://github.com/ChrisTitusTech/winutil/releases/latest) +![GitHub Downloads (specific asset, all releases)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/winutil.ps1?label=Total%20Downloads&style=for-the-badge) +[![](https://dcbadge.limes.pink/api/server/https://discord.gg/RUbZUZyByQ?theme=default-inverted&style=for-the-badge)](https://discord.gg/RUbZUZyByQ) This utility is a compilation of Windows tasks I perform on each Windows system I use. It is meant to streamline *installs*, debloat with *tweaks*, troubleshoot with *config*, and fix Windows *updates*. I am extremely picky about any contributions to keep this project clean and efficient. @@ -41,9 +41,7 @@ If you have Issues, refer to [Known Issues](https://christitustech.github.io/win ### [WinUtil Official Documentation](https://christitustech.github.io/winutil/) -### YouTube Tutorial - -[![Watch the video](https://img.youtube.com/vi/6UQZ5oQg8XA/hqdefault.jpg)](https://www.youtube.com/watch?v=6UQZ5oQg8XA) +### [YouTube Tutorial](https://www.youtube.com/watch?v=6UQZ5oQg8XA) ### [ChrisTitus.com Article](https://christitus.com/windows-tool/) @@ -52,6 +50,12 @@ If you have Issues, refer to [Known Issues](https://christitustech.github.io/win - To morally and mentally support the project, make sure to leave a ⭐️! - EXE Wrapper for $10 @ https://www.cttstore.com/windows-toolbox +## 💖 Sponsors + +These are the sponsors that help keep this project alive with monthly contributions. + +Gregory NavasarkianYusuke SaitoTriHyderaMark AmosJason A. DiegmuellerBrogan BranstetterwyattMetalliDan28Jan WilleOwen + ## 🏅 Thanks to all Contributors Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻. diff --git a/config/applications.json b/config/applications.json index c2926d03..24270ef6 100644 --- a/config/applications.json +++ b/config/applications.json @@ -2639,6 +2639,14 @@ "link": "https://zoom.us/", "winget": "Zoom.Zoom" }, + "zoomit": { + "category": "Utilities", + "choco": "na", + "content": "ZoomIt", + "description": "A screen zoom, annotation, and recording tool for technical presentations and demos", + "link": "https://learn.microsoft.com/en-us/sysinternals/downloads/zoomit", + "winget": "Microsoft.Sysinternals.ZoomIt" + }, "zotero": { "category": "Document", "choco": "zotero", @@ -2879,6 +2887,14 @@ "link": "https://github.com/xM4ddy/OFGB", "winget": "xM4ddy.OFGB" }, + "PaleMoon": { + "category": "Browsers", + "choco": "paleMoon", + "content": "PaleMoon", + "description":"Pale Moon is an Open Source, Goanna-based web browser available for Microsoft Windows and Linux (with other operating systems in development), focusing on efficiency and ease of use.", + "link": "https://www.palemoon.org/download.shtml", + "winget": "MoonchildProductions.PaleMoon" + }, "Shotcut": { "category": "Multimedia Tools", "choco": "na", @@ -2886,5 +2902,45 @@ "description": "Shotcut is a free, open source, cross-platform video editor.", "link": "https://shotcut.org/", "winget": "Meltytech.Shotcut" + }, + "LenovoLegionToolkit": { + "category": "Utilities", + "choco": "na", + "content": "Lenovo Legion Toolkit", + "description": "Lenovo Legion Toolkit (LLT) is a open-source utility created for Lenovo Legion (and similar) series laptops, that allows changing a couple of features that are only available in Lenovo Vantage or Legion Zone. It runs no background services, uses less memory, uses virtually no CPU, and contains no telemetry. Just like Lenovo Vantage, this application is Windows only.", + "link": "https://github.com/BartoszCichecki/LenovoLegionToolkit", + "winget": "BartoszCichecki.LenovoLegionToolkit" + }, + "PulsarEdit": { + "category": "Development", + "choco": "pulsar", + "content": "Pulsar", + "description": "A Community-led Hyper-Hackable Text Editor", + "link": "https://pulsar-edit.dev/", + "winget": "Pulsar-Edit.Pulsar" + }, + "Aegisub": { + "category": "Development", + "choco": "aegisub", + "content": "Aegisub", + "description": "Aegisub is a free, cross-platform open source tool for creating and modifying subtitles. Aegisub makes it quick and easy to time subtitles to audio, and features many powerful tools for styling them, including a built-in real-time video preview.", + "link": "https://github.com/Aegisub/Aegisub", + "winget": "Aegisub.Aegisub" + }, + "SubtitleEdit": { + "category": "Multimedia Tools", + "choco": "na", + "content": "Subtitle Edit", + "description": "Subtitle Edit is a free and open source editor for video subtitles.", + "link": "https://github.com/SubtitleEdit/subtitleedit", + "winget": "Nikse.SubtitleEdit" + }, + "Fork": { + "category": "Development", + "choco": "git-fork", + "content": "Fork", + "description": "Fork - a fast and friendly git client.", + "link": "https://git-fork.com/", + "winget": "Fork.Fork" } } diff --git a/config/tweaks.json b/config/tweaks.json index afae0216..88919728 100644 --- a/config/tweaks.json +++ b/config/tweaks.json @@ -2294,19 +2294,35 @@ "panel": "1", "Order": "a006_", "InvokeScript": [ - " - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\" -Name \"TaskbarEndTask\" -Type \"DWord\" -Value \"1\" - " + "$path = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\" + $name = \"TaskbarEndTask\" + $value = 1 + + # Ensure the registry key exists + if (-not (Test-Path $path)) { + New-Item -Path $path -Force | Out-Null + } + + # Set the property, creating it if it doesn't exist + New-ItemProperty -Path $path -Name $name -PropertyType DWord -Value $value -Force | Out-Null" ], "UndoScript": [ - " - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\" -Name \"TaskbarEndTask\" -Type \"DWord\" -Value \"0\" - " + "$path = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\" + $name = \"TaskbarEndTask\" + $value = 0 + + # Ensure the registry key exists + if (-not (Test-Path $path)) { + New-Item -Path $path -Force | Out-Null + } + + # Set the property, creating it if it doesn't exist + New-ItemProperty -Path $path -Name $name -PropertyType DWord -Value $value -Force | Out-Null" ] }, "WPFTweaksPowershell7": { - "Content": "Replace Default Powershell 5 to Powershell 7", - "Description": "This will edit the config file of the Windows Terminal Replacing the Powershell 5 to Powershell 7 and install Powershell 7 if necessary", + "Content": "Change Windows Terminal default: PowerShell 5 -> PowerShell 7", + "Description": "This will edit the config file of the Windows Terminal replacing PowerShell 5 with PowerShell 7 and installing PS7 if necessary", "category": "Essential Tweaks", "panel": "1", "Order": "a009_", @@ -3067,12 +3083,20 @@ "Order": "a108_", "Type": "Toggle" }, + "WPFToggleHiddenFiles": { + "Content": "Show Hidden Files", + "Description": "If Enabled then Hidden Files will be shown.", + "category": "Customize Preferences", + "panel": "2", + "Order": "a200_", + "Type": "Toggle" + }, "WPFToggleShowExt": { "Content": "Show File Extensions", "Description": "If enabled then File extensions (e.g., .txt, .jpg) are visible.", "category": "Customize Preferences", "panel": "2", - "Order": "a200_", + "Order": "a201_", "Type": "Toggle" }, "WPFToggleTaskbarSearch": { @@ -3080,7 +3104,7 @@ "Description": "If Enabled Search Button will be on the taskbar.", "category": "Customize Preferences", "panel": "2", - "Order": "a201_", + "Order": "a202_", "Type": "Toggle" }, "WPFToggleTaskView": { @@ -3088,7 +3112,7 @@ "Description": "If Enabled then Task View Button in Taskbar will be shown.", "category": "Customize Preferences", "panel": "2", - "Order": "a202_", + "Order": "a203_", "Type": "Toggle" }, "WPFToggleTaskbarWidgets": { @@ -3096,7 +3120,15 @@ "Description": "If Enabled then Widgets Button in Taskbar will be shown.", "category": "Customize Preferences", "panel": "2", - "Order": "a203_", + "Order": "a204_", + "Type": "Toggle" + }, + "WPFToggleTaskbarAlignment": { + "Content": "Switch Taskbar Items between Center & Left", + "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" }, "WPFOOSUbutton": { diff --git a/functions/private/Get-WinUtilToggleStatus.ps1 b/functions/private/Get-WinUtilToggleStatus.ps1 index 05db4d43..76245f9b 100644 --- a/functions/private/Get-WinUtilToggleStatus.ps1 +++ b/functions/private/Get-WinUtilToggleStatus.ps1 @@ -125,13 +125,33 @@ Function Get-WinUtilToggleStatus { return $true } } + + if ($ToggleSwitch -eq "WPFToggleHiddenFiles") { + $HiddenFiles = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced').Hidden + if($HiddenFiles -eq 0){ + return $false + } + else{ + return $true + } + } + if ($ToggleSwitch -eq "WPFToggleTaskbarWidgets") { $TaskbarWidgets = (Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced").TaskBarDa - if($TaskbarWidgets -eq 0) { + if($TaskbarWidgets -eq 0) { return $false - } - else{ + } + else{ return $true - } + } + } + if ($ToggleSwitch -eq "WPFToggleTaskbarAlignment") { + $TaskbarAlignment = (Get-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced").TaskbarAl + if($TaskbarAlignment -eq 0) { + return $false + } + else{ + return $true + } } } diff --git a/functions/private/Install-WinUtilProgramChoco.ps1 b/functions/private/Install-WinUtilProgramChoco.ps1 index 0997c922..029398f5 100644 --- a/functions/private/Install-WinUtilProgramChoco.ps1 +++ b/functions/private/Install-WinUtilProgramChoco.ps1 @@ -96,7 +96,7 @@ function Install-WinUtilProgramChoco { # Cleanup leftovers files if(Test-Path -Path $installOutputFilePath){ Remove-Item -Path $installOutputFilePath } - if(Test-Path -Path $installOutputFilePath){ Remove-Item -Path $uninstallOutputFilePath } + if(Test-Path -Path $uninstallOutputFilePath){ Remove-Item -Path $uninstallOutputFilePath } return; } diff --git a/functions/private/Invoke-WinUtilHiddenFiles.ps1 b/functions/private/Invoke-WinUtilHiddenFiles.ps1 new file mode 100644 index 00000000..81b3d6bb --- /dev/null +++ b/functions/private/Invoke-WinUtilHiddenFiles.ps1 @@ -0,0 +1,34 @@ +function Invoke-WinUtilHiddenFiles { + <# + + .SYNOPSIS + Enable/Disable Hidden Files + + .PARAMETER Enabled + Indicates whether to enable or disable Hidden Files + + #> + Param($Enabled) + Try{ + if ($Enabled -eq $false){ + Write-Host "Enabling Hidden Files" + $value = 1 + } + else { + Write-Host "Disabling Hidden Files" + $value = 0 + } + $Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" + Set-ItemProperty -Path $Path -Name Hidden -Value $value + } + Catch [System.Security.SecurityException] { + Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" + } + Catch [System.Management.Automation.ItemNotFoundException] { + Write-Warning $psitem.Exception.ErrorRecord + } + Catch{ + Write-Warning "Unable to set $Name due to unhandled exception" + Write-Warning $psitem.Exception.StackTrace + } +} diff --git a/functions/private/Invoke-WinUtilSponsors.ps1 b/functions/private/Invoke-WinUtilSponsors.ps1 new file mode 100644 index 00000000..cf75dc27 --- /dev/null +++ b/functions/private/Invoke-WinUtilSponsors.ps1 @@ -0,0 +1,45 @@ +Function Invoke-WinUtilSponsors { + <# + .SYNOPSIS + Lists Sponsors from ChrisTitusTech + .DESCRIPTION + Lists Sponsors from ChrisTitusTech + .EXAMPLE + Invoke-WinUtilSponsors + .NOTES + This function is used to list sponsors from ChrisTitusTech + #> + try { + # Define the URL and headers + $url = "https://github.com/sponsors/ChrisTitusTech" + $headers = @{ + "User-Agent" = "Chrome/58.0.3029.110" + } + + # Fetch the webpage content + try { + $html = Invoke-RestMethod -Uri $url -Headers $headers + } catch { + Write-Output $_.Exception.Message + exit + } + + # Use regex to extract the content between "Current sponsors" and "Past sponsors" + $currentSponsorsPattern = '(?s)(?<=Current sponsors).*?(?=Past sponsors)' + $currentSponsorsHtml = [regex]::Match($html, $currentSponsorsPattern).Value + + # Use regex to extract the sponsor usernames from the alt attributes in the "Current Sponsors" section + $sponsorPattern = '(?<=alt="@)[^"]+' + $sponsors = [regex]::Matches($currentSponsorsHtml, $sponsorPattern) | ForEach-Object { $_.Value } + + # Exclude "ChrisTitusTech" from the sponsors + $sponsors = $sponsors | Where-Object { $_ -ne "ChrisTitusTech" } + + # Return the sponsors + return $sponsors + } + catch { + Write-Error "An error occurred while fetching or processing the sponsors: $_" + return $null + } +} \ No newline at end of file diff --git a/functions/private/Invoke-WinUtilTaskbarAlignment.ps1 b/functions/private/Invoke-WinUtilTaskbarAlignment.ps1 new file mode 100644 index 00000000..0c5e0dfa --- /dev/null +++ b/functions/private/Invoke-WinUtilTaskbarAlignment.ps1 @@ -0,0 +1,34 @@ +function Invoke-WinUtilTaskbarAlignment { + <# + + .SYNOPSIS + Switches between Center & Left Taskbar Alignment + + .PARAMETER Enabled + Indicates whether to make Taskbar Alignment Center or Left + + #> + Param($Enabled) + Try{ + if ($Enabled -eq $false){ + Write-Host "Making Taskbar Alignment to the Center" + $value = 1 + } + else { + Write-Host "Making Taskbar Alignment to the Left" + $value = 0 + } + $Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" + Set-ItemProperty -Path $Path -Name "TaskbarAl" -Value $value + } + Catch [System.Security.SecurityException] { + Write-Warning "Unable to set $Path\$Name to $value due to a Security Exception" + } + Catch [System.Management.Automation.ItemNotFoundException] { + Write-Warning $psitem.Exception.ErrorRecord + } + Catch{ + Write-Warning "Unable to set $Name due to unhandled exception" + Write-Warning $psitem.Exception.StackTrace + } +} diff --git a/functions/private/Show-CustomDialog.ps1 b/functions/private/Show-CustomDialog.ps1 index dc6eb0de..236a3d62 100644 --- a/functions/private/Show-CustomDialog.ps1 +++ b/functions/private/Show-CustomDialog.ps1 @@ -24,6 +24,9 @@ function Show-CustomDialog { .PARAMETER IconSize The Size to use for Icon inside the custom dialog window. + .PARAMETER EnableScroll + A flag indicating whether to enable scrolling if the content exceeds the window size. + .EXAMPLE Show-CustomDialog -Message "This is a custom dialog with a message and an image above." -Width 300 -Height 200 @@ -34,7 +37,8 @@ function Show-CustomDialog { [int]$Height = 200, [int]$FontSize = 10, [int]$HeaderFontSize = 14, - [int]$IconSize = 25 + [int]$IconSize = 25, + [bool]$EnableScroll = $false ) Add-Type -AssemblyName PresentationFramework @@ -246,11 +250,18 @@ $cttLogoPath = @" $messageTextBlock.Inlines.Add((New-Object Windows.Documents.Run($Message))) } - - # Add the TextBlock to the Grid - $grid.Children.Add($messageTextBlock) - [Windows.Controls.Grid]::SetRow($messageTextBlock, 1) # Set the row to the second row (0-based index) - + # Create a ScrollViewer if EnableScroll is true + if ($EnableScroll) { + $scrollViewer = New-Object System.Windows.Controls.ScrollViewer + $scrollViewer.VerticalScrollBarVisibility = 'Auto' + $scrollViewer.HorizontalScrollBarVisibility = 'Disabled' + $scrollViewer.Content = $messageTextBlock + $grid.Children.Add($scrollViewer) + [Windows.Controls.Grid]::SetRow($scrollViewer, 1) # Set the row to the second row (0-based index) + } else { + $grid.Children.Add($messageTextBlock) + [Windows.Controls.Grid]::SetRow($messageTextBlock, 1) # Set the row to the second row (0-based index) + } # Add OK button $okButton = New-Object Windows.Controls.Button diff --git a/functions/public/Invoke-WPFMicrowin.ps1 b/functions/public/Invoke-WPFMicrowin.ps1 index 6aaf96d1..2ec487bc 100644 --- a/functions/public/Invoke-WPFMicrowin.ps1 +++ b/functions/public/Invoke-WPFMicrowin.ps1 @@ -319,6 +319,19 @@ public class PowerManagement { reg delete "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /v "Pinned" /f >$null 2>&1 reg delete "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /v "LayoutCycle" /f >$null 2>&1 Write-Host "Edge icon removed from taskbar" + if (Test-Path "HKLM:\zSOFTWARE\WOW6432Node") + { + # Remove leftovers of 64-bit installations + # --- + # Remove registry values first... + reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" /va /f > $null 2>&1 + reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" /va /f > $null 2>&1 + reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" /va /f > $null 2>&1 + # ...then the registry keys + reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" /f > $null 2>&1 + reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" /f > $null 2>&1 + reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" /f > $null 2>&1 + } } reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d 0 /f diff --git a/functions/public/Invoke-WPFShortcut.ps1 b/functions/public/Invoke-WPFShortcut.ps1 index 9979caba..9c9dcc22 100644 --- a/functions/public/Invoke-WPFShortcut.ps1 +++ b/functions/public/Invoke-WPFShortcut.ps1 @@ -18,12 +18,19 @@ function Invoke-WPFShortcut { ) # Preper the Shortcut Fields and add an a Custom Icon if it's available, else don't add a Custom Icon. + Switch ($ShortcutToAdd) { "WinUtil" { - $SourceExe = "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe" - $IRM = 'irm https://christitus.com/win | iex' - $Powershell = '-ExecutionPolicy Bypass -Command "Start-Process powershell.exe -verb runas -ArgumentList' - $ArgumentsToSourceExe = "$powershell '$IRM'" + # Use Powershell 7 if installed and fallback to PS5 if not + if (Get-Command "pwsh" -ErrorAction SilentlyContinue){ + $shell = "pwsh.exe" + } + else{ + $shell = "powershell.exe" + } + + $shellArgs = "-ExecutionPolicy Bypass -Command `"Start-Process $shell -verb runas -ArgumentList `'-Command `"irm https://christitus.com/win | iex`"`'" + $DestinationName = "WinUtil.lnk" } diff --git a/functions/public/Invoke-WPFToggle.ps1 b/functions/public/Invoke-WPFToggle.ps1 index 9d923edb..539878c7 100644 --- a/functions/public/Invoke-WPFToggle.ps1 +++ b/functions/public/Invoke-WPFToggle.ps1 @@ -30,5 +30,7 @@ function Invoke-WPFToggle { "WPFToggleTaskbarWidgets" {Invoke-WinUtilTaskbarWidgets $(Get-WinUtilToggleStatus WPFToggleTaskbarWidgets)} "WPFToggleTaskbarSearch" {Invoke-WinUtilTaskbarSearch $(Get-WinUtilToggleStatus WPFToggleTaskbarSearch)} "WPFToggleTaskView" {Invoke-WinUtilTaskView $(Get-WinUtilToggleStatus WPFToggleTaskView)} + "WPFToggleHiddenFiles" {Invoke-WinUtilHiddenFiles $(Get-WinUtilToggleStatus WPFToggleHiddenFiles)} + "WPFToggleTaskbarAlignment" {Invoke-WinUtilTaskbarAlignment $(Get-WinUtilToggleStatus WPFToggleTaskbarAlignment)} } } diff --git a/functions/public/Invoke-WPFTweakPS7.ps1 b/functions/public/Invoke-WPFTweakPS7.ps1 index 85ab9108..209b71ce 100644 --- a/functions/public/Invoke-WPFTweakPS7.ps1 +++ b/functions/public/Invoke-WPFTweakPS7.ps1 @@ -25,22 +25,29 @@ function Invoke-WPFTweakPS7{ $targetTerminalName = "Windows PowerShell" } } - - $settingsPath = "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" - if (Test-Path -Path $settingsPath) { - Write-Host "Settings file found." - $settingsContent = Get-Content -Path $settingsPath | ConvertFrom-Json - $ps7Profile = $settingsContent.profiles.list | Where-Object { $_.name -eq $targetTerminalName } - if ($ps7Profile) { - $settingsContent.defaultProfile = $ps7Profile.guid - $updatedSettings = $settingsContent | ConvertTo-Json -Depth 100 - Set-Content -Path $settingsPath -Value $updatedSettings - Write-Host "Default profile updated to $targetTerminalName using the name attribute." - } else { - Write-Host "No PowerShell 7 profile found in Windows Terminal settings using the name attribute." - } - } else { - Write-Host "Settings file not found at $settingsPath" + # Check if the Windows Terminal is installed and return if not (Prerequisite for the following code) + if (-not (Get-Command "wt" -ErrorAction SilentlyContinue)){ + Write-Host "Windows Terminal not installed. Skipping Terminal preference" + return + } + # Check if the Windows Terminal settings.json file exists and return if not (Prereqisite for the following code) + $settingsPath = "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" + if (-not (Test-Path -Path $settingsPath)){ + Write-Host "Windows Terminal Settings file not found at $settingsPath" + return } -} + Write-Host "Settings file found." + $settingsContent = Get-Content -Path $settingsPath | ConvertFrom-Json + $ps7Profile = $settingsContent.profiles.list | Where-Object { $_.name -eq $targetTerminalName } + if ($ps7Profile) { + $settingsContent.defaultProfile = $ps7Profile.guid + $updatedSettings = $settingsContent | ConvertTo-Json -Depth 100 + Set-Content -Path $settingsPath -Value $updatedSettings + Write-Host "Default profile updated to " -NoNewline + Write-Host "$targetTerminalName " -ForegroundColor White -NoNewline + Write-Host "using the name attribute." + } else { + Write-Host "No PowerShell 7 profile found in Windows Terminal settings using the name attribute." + } +} diff --git a/scripts/main.ps1 b/scripts/main.ps1 index ba6fe961..f1d65ee2 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -508,5 +508,32 @@ Version : Current sponsors for ChrisTitusTech: +"@ + $authorInfo += "`n" + try { + # Call the function to get the sponsors + $sponsors = Invoke-WinUtilSponsors + + # Append the sponsors to the authorInfo + $sponsors | ForEach-Object { $authorInfo += "$_`n" } + } + catch { + $authorInfo += "An error occurred while fetching or processing the sponsors: $_`n" + } + + $FontSize = $sync.configs.themes.$ctttheme.CustomDialogFontSize + $HeaderFontSize = $sync.configs.themes.$ctttheme.CustomDialogFontSizeHeader + $IconSize = $sync.configs.themes.$ctttheme.CustomDialogIconSize + $Width = $sync.configs.themes.$ctttheme.CustomDialogWidth + $Height = $sync.configs.themes.$ctttheme.CustomDialogHeight + Show-CustomDialog -Message $authorInfo -Width $Width -Height $Height -FontSize $FontSize -HeaderFontSize $HeaderFontSize -IconSize $IconSize -EnableScroll $true +}) $sync["Form"].ShowDialog() | out-null Stop-Transcript diff --git a/winutil.ps1 b/winutil.ps1 index 483d5e12..3c609c74 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -8,7 +8,7 @@ Author : Chris Titus @christitustech Runspace Author: @DeveloperDurp GitHub : https://github.com/ChrisTitusTech - Version : 24.07.13 + Version : 24.07.15 #> param ( [switch]$Debug, @@ -45,7 +45,7 @@ Add-Type -AssemblyName System.Windows.Forms # Variable to sync between runspaces $sync = [Hashtable]::Synchronized(@{}) $sync.PSScriptRoot = $PSScriptRoot -$sync.version = "24.07.13" +$sync.version = "24.07.15" $sync.configs = @{} $sync.ProcessRunning = $false @@ -715,14 +715,34 @@ Function Get-WinUtilToggleStatus { return $true } } + + if ($ToggleSwitch -eq "WPFToggleHiddenFiles") { + $HiddenFiles = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced').Hidden + if($HiddenFiles -eq 0){ + return $false + } + else{ + return $true + } + } + if ($ToggleSwitch -eq "WPFToggleTaskbarWidgets") { $TaskbarWidgets = (Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced").TaskBarDa - if($TaskbarWidgets -eq 0) { + if($TaskbarWidgets -eq 0) { return $false - } - else{ + } + else{ return $true - } + } + } + if ($ToggleSwitch -eq "WPFToggleTaskbarAlignment") { + $TaskbarAlignment = (Get-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced").TaskbarAl + if($TaskbarAlignment -eq 0) { + return $false + } + else{ + return $true + } } } function Get-WinUtilVariables { @@ -953,7 +973,7 @@ function Install-WinUtilProgramChoco { # Cleanup leftovers files if(Test-Path -Path $installOutputFilePath){ Remove-Item -Path $installOutputFilePath } - if(Test-Path -Path $installOutputFilePath){ Remove-Item -Path $uninstallOutputFilePath } + if(Test-Path -Path $uninstallOutputFilePath){ Remove-Item -Path $uninstallOutputFilePath } return; } @@ -2029,6 +2049,40 @@ function Invoke-WinUtilGPU { } return $true } +function Invoke-WinUtilHiddenFiles { + <# + + .SYNOPSIS + Enable/Disable Hidden Files + + .PARAMETER Enabled + Indicates whether to enable or disable Hidden Files + + #> + Param($Enabled) + Try{ + if ($Enabled -eq $false){ + Write-Host "Enabling Hidden Files" + $value = 1 + } + else { + Write-Host "Disabling Hidden Files" + $value = 0 + } + $Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" + Set-ItemProperty -Path $Path -Name Hidden -Value $value + } + Catch [System.Security.SecurityException] { + Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" + } + Catch [System.Management.Automation.ItemNotFoundException] { + Write-Warning $psitem.Exception.ErrorRecord + } + Catch{ + Write-Warning "Unable to set $Name due to unhandled exception" + Write-Warning $psitem.Exception.StackTrace + } +} Function Invoke-WinUtilMouseAcceleration { <# @@ -2282,6 +2336,51 @@ function Invoke-WinUtilSnapWindow { Write-Warning $psitem.Exception.StackTrace } } +Function Invoke-WinUtilSponsors { + <# + .SYNOPSIS + Lists Sponsors from ChrisTitusTech + .DESCRIPTION + Lists Sponsors from ChrisTitusTech + .EXAMPLE + Invoke-WinUtilSponsors + .NOTES + This function is used to list sponsors from ChrisTitusTech + #> + try { + # Define the URL and headers + $url = "https://github.com/sponsors/ChrisTitusTech" + $headers = @{ + "User-Agent" = "Chrome/58.0.3029.110" + } + + # Fetch the webpage content + try { + $html = Invoke-RestMethod -Uri $url -Headers $headers + } catch { + Write-Output $_.Exception.Message + exit + } + + # Use regex to extract the content between "Current sponsors" and "Past sponsors" + $currentSponsorsPattern = '(?s)(?<=Current sponsors).*?(?=Past sponsors)' + $currentSponsorsHtml = [regex]::Match($html, $currentSponsorsPattern).Value + + # Use regex to extract the sponsor usernames from the alt attributes in the "Current Sponsors" section + $sponsorPattern = '(?<=alt="@)[^"]+' + $sponsors = [regex]::Matches($currentSponsorsHtml, $sponsorPattern) | ForEach-Object { $_.Value } + + # Exclude "ChrisTitusTech" from the sponsors + $sponsors = $sponsors | Where-Object { $_ -ne "ChrisTitusTech" } + + # Return the sponsors + return $sponsors + } + catch { + Write-Error "An error occurred while fetching or processing the sponsors: $_" + return $null + } +} Function Invoke-WinUtilStickyKeys { <# .SYNOPSIS @@ -2313,6 +2412,40 @@ Function Invoke-WinUtilStickyKeys { Write-Warning $psitem.Exception.StackTrace } } +function Invoke-WinUtilTaskbarAlignment { + <# + + .SYNOPSIS + Switches between Center & Left Taskbar Alignment + + .PARAMETER Enabled + Indicates whether to make Taskbar Alignment Center or Left + + #> + Param($Enabled) + Try{ + if ($Enabled -eq $false){ + Write-Host "Making Taskbar Alignment to the Center" + $value = 1 + } + else { + Write-Host "Making Taskbar Alignment to the Left" + $value = 0 + } + $Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" + Set-ItemProperty -Path $Path -Name "TaskbarAl" -Value $value + } + Catch [System.Security.SecurityException] { + Write-Warning "Unable to set $Path\$Name to $value due to a Security Exception" + } + Catch [System.Management.Automation.ItemNotFoundException] { + Write-Warning $psitem.Exception.ErrorRecord + } + Catch{ + Write-Warning "Unable to set $Name due to unhandled exception" + Write-Warning $psitem.Exception.StackTrace + } +} function Invoke-WinUtilTaskbarSearch { <# @@ -2828,6 +2961,9 @@ function Show-CustomDialog { .PARAMETER IconSize The Size to use for Icon inside the custom dialog window. + .PARAMETER EnableScroll + A flag indicating whether to enable scrolling if the content exceeds the window size. + .EXAMPLE Show-CustomDialog -Message "This is a custom dialog with a message and an image above." -Width 300 -Height 200 @@ -2838,7 +2974,8 @@ function Show-CustomDialog { [int]$Height = 200, [int]$FontSize = 10, [int]$HeaderFontSize = 14, - [int]$IconSize = 25 + [int]$IconSize = 25, + [bool]$EnableScroll = $false ) Add-Type -AssemblyName PresentationFramework @@ -3050,11 +3187,18 @@ $cttLogoPath = @" $messageTextBlock.Inlines.Add((New-Object Windows.Documents.Run($Message))) } - - # Add the TextBlock to the Grid - $grid.Children.Add($messageTextBlock) - [Windows.Controls.Grid]::SetRow($messageTextBlock, 1) # Set the row to the second row (0-based index) - + # Create a ScrollViewer if EnableScroll is true + if ($EnableScroll) { + $scrollViewer = New-Object System.Windows.Controls.ScrollViewer + $scrollViewer.VerticalScrollBarVisibility = 'Auto' + $scrollViewer.HorizontalScrollBarVisibility = 'Disabled' + $scrollViewer.Content = $messageTextBlock + $grid.Children.Add($scrollViewer) + [Windows.Controls.Grid]::SetRow($scrollViewer, 1) # Set the row to the second row (0-based index) + } else { + $grid.Children.Add($messageTextBlock) + [Windows.Controls.Grid]::SetRow($messageTextBlock, 1) # Set the row to the second row (0-based index) + } # Add OK button $okButton = New-Object Windows.Controls.Button @@ -4479,6 +4623,19 @@ public class PowerManagement { reg delete "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /v "Pinned" /f >$null 2>&1 reg delete "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /v "LayoutCycle" /f >$null 2>&1 Write-Host "Edge icon removed from taskbar" + if (Test-Path "HKLM:\zSOFTWARE\WOW6432Node") + { + # Remove leftovers of 64-bit installations + # --- + # Remove registry values first... + reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" /va /f > $null 2>&1 + reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" /va /f > $null 2>&1 + reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" /va /f > $null 2>&1 + # ...then the registry keys + reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" /f > $null 2>&1 + reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" /f > $null 2>&1 + reg delete "HKLM\zSOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" /f > $null 2>&1 + } } reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d 0 /f @@ -4869,14 +5026,20 @@ function Invoke-WPFShortcut { [bool]$RunAsAdmin = $false ) - # Preper the Shortcut Fields and add an a Custom Icon if it's available at "$env:TEMP\cttlogo.png", else don't add a Custom Icon. + # add an a Custom Icon if it's available at "$env:TEMP\cttlogo.png", else don't add a Custom Icon. $iconPath = $null Switch ($ShortcutToAdd) { "WinUtil" { - $SourceExe = "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe" - $IRM = 'irm https://christitus.com/win | iex' - $Powershell = '-ExecutionPolicy Bypass -Command "Start-Process powershell.exe -verb runas -ArgumentList' - $ArgumentsToSourceExe = "$powershell '$IRM'" + # Use Powershell 7 if installed and fallback to PS5 if not + if (Get-Command "pwsh" -ErrorAction SilentlyContinue){ + $shell = "pwsh.exe" + } + else{ + $shell = "powershell.exe" + } + + $shellArgs = "-ExecutionPolicy Bypass -Command `"Start-Process $shell -verb runas -ArgumentList `'-Command `"irm https://christitus.com/win | iex`"`'" + $DestinationName = "WinUtil.lnk" Invoke-WebRequest -Uri "https://christitus.com/images/logo-full.png" -OutFile "$env:TEMP\cttlogo.png" @@ -4904,9 +5067,9 @@ function Invoke-WPFShortcut { # Prepare the Shortcut paramter $WshShell = New-Object -comObject WScript.Shell $Shortcut = $WshShell.CreateShortcut($FileBrowser.FileName) - $Shortcut.TargetPath = $SourceExe - $Shortcut.Arguments = $ArgumentsToSourceExe - if ($iconPath -ne $null) { + $Shortcut.TargetPath = $shell + $Shortcut.Arguments = $shellArgs + if ($null -ne $iconPath) { $shortcut.IconLocation = $iconPath } @@ -4985,6 +5148,8 @@ function Invoke-WPFToggle { "WPFToggleTaskbarWidgets" {Invoke-WinUtilTaskbarWidgets $(Get-WinUtilToggleStatus WPFToggleTaskbarWidgets)} "WPFToggleTaskbarSearch" {Invoke-WinUtilTaskbarSearch $(Get-WinUtilToggleStatus WPFToggleTaskbarSearch)} "WPFToggleTaskView" {Invoke-WinUtilTaskView $(Get-WinUtilToggleStatus WPFToggleTaskView)} + "WPFToggleHiddenFiles" {Invoke-WinUtilHiddenFiles $(Get-WinUtilToggleStatus WPFToggleHiddenFiles)} + "WPFToggleTaskbarAlignment" {Invoke-WinUtilTaskbarAlignment $(Get-WinUtilToggleStatus WPFToggleTaskbarAlignment)} } } function Invoke-WPFTweakPS7{ @@ -5014,25 +5179,32 @@ function Invoke-WPFTweakPS7{ $targetTerminalName = "Windows PowerShell" } } - - $settingsPath = "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" - if (Test-Path -Path $settingsPath) { - Write-Host "Settings file found." - $settingsContent = Get-Content -Path $settingsPath | ConvertFrom-Json - $ps7Profile = $settingsContent.profiles.list | Where-Object { $_.name -eq $targetTerminalName } - if ($ps7Profile) { - $settingsContent.defaultProfile = $ps7Profile.guid - $updatedSettings = $settingsContent | ConvertTo-Json -Depth 100 - Set-Content -Path $settingsPath -Value $updatedSettings - Write-Host "Default profile updated to $targetTerminalName using the name attribute." - } else { - Write-Host "No PowerShell 7 profile found in Windows Terminal settings using the name attribute." - } - } else { - Write-Host "Settings file not found at $settingsPath" + # Check if the Windows Terminal is installed and return if not (Prerequisite for the following code) + if (-not (Get-Command "wt" -ErrorAction SilentlyContinue)){ + Write-Host "Windows Terminal not installed. Skipping Terminal preference" + return + } + # Check if the Windows Terminal settings.json file exists and return if not (Prereqisite for the following code) + $settingsPath = "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" + if (-not (Test-Path -Path $settingsPath)){ + Write-Host "Windows Terminal Settings file not found at $settingsPath" + return } -} + Write-Host "Settings file found." + $settingsContent = Get-Content -Path $settingsPath | ConvertFrom-Json + $ps7Profile = $settingsContent.profiles.list | Where-Object { $_.name -eq $targetTerminalName } + if ($ps7Profile) { + $settingsContent.defaultProfile = $ps7Profile.guid + $updatedSettings = $settingsContent | ConvertTo-Json -Depth 100 + Set-Content -Path $settingsPath -Value $updatedSettings + Write-Host "Default profile updated to " -NoNewline + Write-Host "$targetTerminalName " -ForegroundColor White -NoNewline + Write-Host "using the name attribute." + } else { + Write-Host "No PowerShell 7 profile found in Windows Terminal settings using the name attribute." + } +} function Invoke-WPFtweaksbutton { <# @@ -8185,6 +8357,14 @@ $sync.configs.applications = '{ "link": "https://zoom.us/", "winget": "Zoom.Zoom" }, + "WPFInstallzoomit": { + "category": "Utilities", + "choco": "na", + "content": "ZoomIt", + "description": "A screen zoom, annotation, and recording tool for technical presentations and demos", + "link": "https://learn.microsoft.com/en-us/sysinternals/downloads/zoomit", + "winget": "Microsoft.Sysinternals.ZoomIt" + }, "WPFInstallzotero": { "category": "Document", "choco": "zotero", @@ -8425,6 +8605,14 @@ $sync.configs.applications = '{ "link": "https://github.com/xM4ddy/OFGB", "winget": "xM4ddy.OFGB" }, + "WPFInstallPaleMoon": { + "category": "Browsers", + "choco": "paleMoon", + "content": "PaleMoon", + "description": "Pale Moon is an Open Source, Goanna-based web browser available for Microsoft Windows and Linux (with other operating systems in development), focusing on efficiency and ease of use.", + "link": "https://www.palemoon.org/download.shtml", + "winget": "MoonchildProductions.PaleMoon" + }, "WPFInstallShotcut": { "category": "Multimedia Tools", "choco": "na", @@ -8432,6 +8620,46 @@ $sync.configs.applications = '{ "description": "Shotcut is a free, open source, cross-platform video editor.", "link": "https://shotcut.org/", "winget": "Meltytech.Shotcut" + }, + "WPFInstallLenovoLegionToolkit": { + "category": "Utilities", + "choco": "na", + "content": "Lenovo Legion Toolkit", + "description": "Lenovo Legion Toolkit (LLT) is a open-source utility created for Lenovo Legion (and similar) series laptops, that allows changing a couple of features that are only available in Lenovo Vantage or Legion Zone. It runs no background services, uses less memory, uses virtually no CPU, and contains no telemetry. Just like Lenovo Vantage, this application is Windows only.", + "link": "https://github.com/BartoszCichecki/LenovoLegionToolkit", + "winget": "BartoszCichecki.LenovoLegionToolkit" + }, + "WPFInstallPulsarEdit": { + "category": "Development", + "choco": "pulsar", + "content": "Pulsar", + "description": "A Community-led Hyper-Hackable Text Editor", + "link": "https://pulsar-edit.dev/", + "winget": "Pulsar-Edit.Pulsar" + }, + "WPFInstallAegisub": { + "category": "Development", + "choco": "aegisub", + "content": "Aegisub", + "description": "Aegisub is a free, cross-platform open source tool for creating and modifying subtitles. Aegisub makes it quick and easy to time subtitles to audio, and features many powerful tools for styling them, including a built-in real-time video preview.", + "link": "https://github.com/Aegisub/Aegisub", + "winget": "Aegisub.Aegisub" + }, + "WPFInstallSubtitleEdit": { + "category": "Multimedia Tools", + "choco": "na", + "content": "Subtitle Edit", + "description": "Subtitle Edit is a free and open source editor for video subtitles.", + "link": "https://github.com/SubtitleEdit/subtitleedit", + "winget": "Nikse.SubtitleEdit" + }, + "WPFInstallFork": { + "category": "Development", + "choco": "git-fork", + "content": "Fork", + "description": "Fork - a fast and friendly git client.", + "link": "https://git-fork.com/", + "winget": "Fork.Fork" } }' | convertfrom-json $sync.configs.dns = '{ @@ -11263,19 +11491,35 @@ $sync.configs.tweaks = '{ "panel": "1", "Order": "a006_", "InvokeScript": [ - " - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\" -Name \"TaskbarEndTask\" -Type \"DWord\" -Value \"1\" - " + "$path = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\" + $name = \"TaskbarEndTask\" + $value = 1 + + # Ensure the registry key exists + if (-not (Test-Path $path)) { + New-Item -Path $path -Force | Out-Null + } + + # Set the property, creating it if it doesn''t exist + New-ItemProperty -Path $path -Name $name -PropertyType DWord -Value $value -Force | Out-Null" ], "UndoScript": [ - " - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\" -Name \"TaskbarEndTask\" -Type \"DWord\" -Value \"0\" - " + "$path = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\" + $name = \"TaskbarEndTask\" + $value = 0 + + # Ensure the registry key exists + if (-not (Test-Path $path)) { + New-Item -Path $path -Force | Out-Null + } + + # Set the property, creating it if it doesn''t exist + New-ItemProperty -Path $path -Name $name -PropertyType DWord -Value $value -Force | Out-Null" ] }, "WPFTweaksPowershell7": { - "Content": "Replace Default Powershell 5 to Powershell 7", - "Description": "This will edit the config file of the Windows Terminal Replacing the Powershell 5 to Powershell 7 and install Powershell 7 if necessary", + "Content": "Change Windows Terminal default: PowerShell 5 -> PowerShell 7", + "Description": "This will edit the config file of the Windows Terminal replacing PowerShell 5 with PowerShell 7 and installing PS7 if necessary", "category": "Essential Tweaks", "panel": "1", "Order": "a009_", @@ -12035,12 +12279,20 @@ $sync.configs.tweaks = '{ "Order": "a108_", "Type": "Toggle" }, + "WPFToggleHiddenFiles": { + "Content": "Show Hidden Files", + "Description": "If Enabled then Hidden Files will be shown.", + "category": "Customize Preferences", + "panel": "2", + "Order": "a200_", + "Type": "Toggle" + }, "WPFToggleShowExt": { "Content": "Show File Extensions", "Description": "If enabled then File extensions (e.g., .txt, .jpg) are visible.", "category": "Customize Preferences", "panel": "2", - "Order": "a200_", + "Order": "a201_", "Type": "Toggle" }, "WPFToggleTaskbarSearch": { @@ -12048,7 +12300,7 @@ $sync.configs.tweaks = '{ "Description": "If Enabled Search Button will be on the taskbar.", "category": "Customize Preferences", "panel": "2", - "Order": "a201_", + "Order": "a202_", "Type": "Toggle" }, "WPFToggleTaskView": { @@ -12056,7 +12308,7 @@ $sync.configs.tweaks = '{ "Description": "If Enabled then Task View Button in Taskbar will be shown.", "category": "Customize Preferences", "panel": "2", - "Order": "a202_", + "Order": "a203_", "Type": "Toggle" }, "WPFToggleTaskbarWidgets": { @@ -12064,7 +12316,15 @@ $sync.configs.tweaks = '{ "Description": "If Enabled then Widgets Button in Taskbar will be shown.", "category": "Customize Preferences", "panel": "2", - "Order": "a203_", + "Order": "a204_", + "Type": "Toggle" + }, + "WPFToggleTaskbarAlignment": { + "Content": "Switch Taskbar Items between Center & Left", + "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" }, "WPFOOSUbutton": { @@ -12820,6 +13080,7 @@ $inputXML = ' + @@ -12913,6 +13174,10 @@ $inputXML = ' + + + + @@ -13031,6 +13296,10 @@ $inputXML = ' + + + + @@ -13055,6 +13324,10 @@ $inputXML = ' + + + + @@ -13151,6 +13424,14 @@ $inputXML = ' + + + + + + + + @@ -13159,10 +13440,6 @@ $inputXML = ' - - - - @@ -13707,6 +13984,10 @@ $inputXML = ' + + + + @@ -13754,14 +14035,14 @@ $inputXML = ' - - - - + + + + @@ -14045,14 +14326,14 @@ $inputXML = ' + + + + - - - - @@ -14061,6 +14342,10 @@ $inputXML = ' + + + + @@ -14349,6 +14634,10 @@ $inputXML = ' + + + + @@ -14394,7 +14683,7 @@ $inputXML = ' - + @@ -14474,6 +14763,10 @@ $inputXML = '