Test 2023 02 02 (#1556)

* Fix config tab (#1547)

The JSON is poorly formatted. In my machine this resolved the issue

* Compile Winutil

* Add toggle "sticky keys" (#1546)

Adds a toggle to enable/disable sticky keys

* added miniconda, temurin, presentmon and pyenv-win (#1542)

* Compile Winutil

---------

Co-authored-by: Yuri Gabriel <97139700+Yuuh15@users.noreply.github.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: Jakub Krojec <jakub.krojec@gmail.com>
This commit is contained in:
Chris Titus 2024-02-03 11:42:14 -06:00 committed by GitHub
parent f472057c12
commit 4773cd6d2b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 195 additions and 27 deletions

View File

@ -391,7 +391,7 @@
"link": "https://dotnet.microsoft.com/download/dotnet/8.0", "link": "https://dotnet.microsoft.com/download/dotnet/8.0",
"winget": "Microsoft.DotNet.DesktopRuntime.8" "winget": "Microsoft.DotNet.DesktopRuntime.8"
}, },
"WPFInstalldmt": { "WPFInstalldmt": {
"winget": "GNE.DualMonitorTools", "winget": "GNE.DualMonitorTools",
"choco": "dual-monitor-tools", "choco": "dual-monitor-tools",
"category": "Utilities", "category": "Utilities",
@ -2232,11 +2232,47 @@
"winget": "Zulip.Zulip" "winget": "Zulip.Zulip"
}, },
"WPFInstallsyncthingtray": { "WPFInstallsyncthingtray": {
"winget": " Martchus.syncthingtray",
"choco": "syncthingtray",
"category": "Utilities", "category": "Utilities",
"choco": "syncthingtray",
"content": "syncthingtray", "content": "syncthingtray",
"description": "Might be the alternative for Synctrayzor. Windows tray utility / filesystem watcher / launcher for Syncthing",
"link": "https://github.com/Martchus/syncthingtray", "link": "https://github.com/Martchus/syncthingtray",
"description": "Might be the alternative for Synctrayzro.Windows tray utility / filesystem watcher / launcher for Syncthing " "winget": "Martchus.syncthingtray"
} },
} "WPFInstallminiconda": {
"category": "Development",
"choco": "miniconda3",
"content": "Miniconda",
"description": "Miniconda is a free minimal installer for conda. It is a small bootstrap version of Anaconda that includes only conda, Python, the packages they both depend on, and a small number of other useful packages (like pip, zlib, and a few others).",
"link": "https://docs.conda.io/projects/miniconda",
"panel": "1",
"winget": "Anaconda.Miniconda3"
},
"WPFInstalltemurin": {
"category": "Development",
"choco": "temurin",
"content": "Eclipse Temurin",
"description": "Eclipse Temurin is the open source Java SE build based upon OpenJDK.",
"link": "https://adoptium.net/temurin/",
"panel": "1",
"winget": "EclipseAdoptium.Temurin.21.JDK"
},
"WPFInstallintelpresentmon": {
"category": "Utilities",
"choco": "na",
"content": "Intel® PresentMon",
"description": "A new gaming performance overlay and telemetry application to monitor and measure your gaming experience.",
"link": "https://game.intel.com/us/stories/intel-presentmon/",
"panel": "4",
"winget": "Intel.PresentMon.Beta"
},
"WPFInstallpyenvwin": {
"category": "Development",
"choco": "pyenv-win",
"content": "Python Version Manager (pyenv-win)",
"description": "pyenv for Windows is a simple python version management tool. It lets you easily switch between multiple versions of Python.",
"link": "https://pyenv-win.github.io/pyenv-win/",
"panel": "1",
"winget": "na"
}
}

View File

@ -75,12 +75,11 @@
"NFS-Administration" "NFS-Administration"
], ],
"InvokeScript": [ "InvokeScript": [
"nfsadmin client stop "nfsadmin client stop",
Set-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\ClientForNFS\\CurrentVersion\\Default' -Name 'AnonymousUID' -Type DWord -Value 0 "Set-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\ClientForNFS\\CurrentVersion\\Default' -Name 'AnonymousUID' -Type DWord -Value 0",
Set-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\ClientForNFS\\CurrentVersion\\Default' -Name 'AnonymousGID' -Type DWord -Value 0 "Set-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\ClientForNFS\\CurrentVersion\\Default' -Name 'AnonymousGID' -Type DWord -Value 0",
nfsadmin client start "nfsadmin client start",
nfsadmin client localhost config fileaccess=755 SecFlavors=+sys -krb5 -krb5i "nfsadmin client localhost config fileaccess=755 SecFlavors=+sys -krb5 -krb5i"
"
] ]
}, },
"WPFFeatureEnableSearchSuggestions": { "WPFFeatureEnableSearchSuggestions": {
@ -178,7 +177,7 @@
"category": "Features", "category": "Features",
"panel": "1", "panel": "1",
"Order": "a021_", "Order": "a021_",
"Description": "Windows Sandbox is a lightweight virtual machine that provides a temporary desktop environment to safely run applications and programs in isolation.", "Description": "Windows Sandbox is a lightweight virtual machine that provides a temporary desktop environment to safely run applications and programs in isolation."
}, },
"WPFFeatureInstall": { "WPFFeatureInstall": {
"Content": "Install Features", "Content": "Install Features",

View File

@ -2602,6 +2602,14 @@
"Order": "a066_", "Order": "a066_",
"Type": "Toggle" "Type": "Toggle"
}, },
"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": "a067_",
"Type": "Toggle"
},
"WPFchangedns": { "WPFchangedns": {
"Content": "DNS", "Content": "DNS",
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",

View File

@ -80,4 +80,13 @@ Function Get-WinUtilToggleStatus {
return $false return $false
} }
} }
if ($ToggleSwitch -eq "WPFToggleStickyKeys") {
$StickyKeys = (Get-ItemProperty -path 'HKCU:\Control Panel\Accessibility\StickyKeys').Flags
if($StickyKeys -eq 58){
return $false
}
else{
return $true
}
}
} }

View File

@ -0,0 +1,31 @@
Function Invoke-WinUtilStickyKeys {
<#
.SYNOPSIS
Disables/Enables Sticky Keyss on startup
.PARAMETER Enabled
Indicates whether to enable or disable Sticky Keys on startup
#>
Param($Enabled)
Try {
if ($Enabled -eq $false){
Write-Host "Enabling Sticky Keys On startup"
$value = 510
}
else {
Write-Host "Disabling Sticky Keys On startup"
$value = 58
}
$Path = "HKCU:\Control Panel\Accessibility\StickyKeys"
Set-ItemProperty -Path $Path -Name Flags -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
}
}

View File

@ -24,5 +24,6 @@ function Invoke-WPFToggle {
"WPFToggleShowExt" {Invoke-WinUtilShowExt $(Get-WinUtilToggleStatus WPFToggleShowExt)} "WPFToggleShowExt" {Invoke-WinUtilShowExt $(Get-WinUtilToggleStatus WPFToggleShowExt)}
"WPFToggleSnapFlyout" {Invoke-WinUtilSnapFlyout $(Get-WinUtilToggleStatus WPFToggleSnapFlyout)} "WPFToggleSnapFlyout" {Invoke-WinUtilSnapFlyout $(Get-WinUtilToggleStatus WPFToggleSnapFlyout)}
"WPFToggleMouseAcceleration" {Invoke-WinUtilMouseAcceleration $(Get-WinUtilToggleStatus WPFToggleMouseAcceleration)} "WPFToggleMouseAcceleration" {Invoke-WinUtilMouseAcceleration $(Get-WinUtilToggleStatus WPFToggleMouseAcceleration)}
"WPFToggleStickyKeys" {Invoke-WinUtilStickyKeys $(Get-WinUtilToggleStatus WPFToggleStickyKeys)}
} }
} }

View File

@ -10,7 +10,7 @@
Author : Chris Titus @christitustech Author : Chris Titus @christitustech
Runspace Author: @DeveloperDurp Runspace Author: @DeveloperDurp
GitHub : https://github.com/ChrisTitusTech GitHub : https://github.com/ChrisTitusTech
Version : 24.02.02 Version : 24.02.03
#> #>
param ( param (
[switch]$Debug, [switch]$Debug,
@ -47,7 +47,7 @@ Add-Type -AssemblyName System.Windows.Forms
# Variable to sync between runspaces # Variable to sync between runspaces
$sync = [Hashtable]::Synchronized(@{}) $sync = [Hashtable]::Synchronized(@{})
$sync.PSScriptRoot = $PSScriptRoot $sync.PSScriptRoot = $PSScriptRoot
$sync.version = "24.02.02" $sync.version = "24.02.03"
$sync.configs = @{} $sync.configs = @{}
$sync.ProcessRunning = $false $sync.ProcessRunning = $false
@ -473,6 +473,15 @@ Function Get-WinUtilToggleStatus {
return $false return $false
} }
} }
if ($ToggleSwitch -eq "WPFToggleStickyKeys") {
$StickyKeys = (Get-ItemProperty -path 'HKCU:\Control Panel\Accessibility\StickyKeys').Flags
if($StickyKeys -eq 58){
return $false
}
else{
return $true
}
}
} }
function Get-WinUtilVariables { function Get-WinUtilVariables {
@ -1672,6 +1681,37 @@ function Invoke-WinUtilSnapFlyout {
Write-Warning $psitem.Exception.StackTrace Write-Warning $psitem.Exception.StackTrace
} }
} }
Function Invoke-WinUtilStickyKeys {
<#
.SYNOPSIS
Disables/Enables Sticky Keyss on startup
.PARAMETER Enabled
Indicates whether to enable or disable Sticky Keys on startup
#>
Param($Enabled)
Try {
if ($Enabled -eq $false){
Write-Host "Enabling Sticky Keys On startup"
$value = 510
}
else {
Write-Host "Disabling Sticky Keys On startup"
$value = 58
}
$Path = "HKCU:\Control Panel\Accessibility\StickyKeys"
Set-ItemProperty -Path $Path -Name Flags -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-WinUtilTweaks { function Invoke-WinUtilTweaks {
<# <#
@ -3905,6 +3945,7 @@ function Invoke-WPFToggle {
"WPFToggleShowExt" {Invoke-WinUtilShowExt $(Get-WinUtilToggleStatus WPFToggleShowExt)} "WPFToggleShowExt" {Invoke-WinUtilShowExt $(Get-WinUtilToggleStatus WPFToggleShowExt)}
"WPFToggleSnapFlyout" {Invoke-WinUtilSnapFlyout $(Get-WinUtilToggleStatus WPFToggleSnapFlyout)} "WPFToggleSnapFlyout" {Invoke-WinUtilSnapFlyout $(Get-WinUtilToggleStatus WPFToggleSnapFlyout)}
"WPFToggleMouseAcceleration" {Invoke-WinUtilMouseAcceleration $(Get-WinUtilToggleStatus WPFToggleMouseAcceleration)} "WPFToggleMouseAcceleration" {Invoke-WinUtilMouseAcceleration $(Get-WinUtilToggleStatus WPFToggleMouseAcceleration)}
"WPFToggleStickyKeys" {Invoke-WinUtilStickyKeys $(Get-WinUtilToggleStatus WPFToggleStickyKeys)}
} }
} }
function Invoke-WPFtweaksbutton { function Invoke-WPFtweaksbutton {
@ -5765,7 +5806,7 @@ $sync.configs.applications = '{
"link": "https://dotnet.microsoft.com/download/dotnet/8.0", "link": "https://dotnet.microsoft.com/download/dotnet/8.0",
"winget": "Microsoft.DotNet.DesktopRuntime.8" "winget": "Microsoft.DotNet.DesktopRuntime.8"
}, },
"WPFInstalldmt": { "WPFInstalldmt": {
"winget": "GNE.DualMonitorTools", "winget": "GNE.DualMonitorTools",
"choco": "dual-monitor-tools", "choco": "dual-monitor-tools",
"category": "Utilities", "category": "Utilities",
@ -7606,13 +7647,49 @@ $sync.configs.applications = '{
"winget": "Zulip.Zulip" "winget": "Zulip.Zulip"
}, },
"WPFInstallsyncthingtray": { "WPFInstallsyncthingtray": {
"winget": " Martchus.syncthingtray",
"choco": "syncthingtray",
"category": "Utilities", "category": "Utilities",
"choco": "syncthingtray",
"content": "syncthingtray", "content": "syncthingtray",
"description": "Might be the alternative for Synctrayzor. Windows tray utility / filesystem watcher / launcher for Syncthing",
"link": "https://github.com/Martchus/syncthingtray", "link": "https://github.com/Martchus/syncthingtray",
"description": "Might be the alternative for Synctrayzro.Windows tray utility / filesystem watcher / launcher for Syncthing " "winget": "Martchus.syncthingtray"
} },
"WPFInstallminiconda": {
"category": "Development",
"choco": "miniconda3",
"content": "Miniconda",
"description": "Miniconda is a free minimal installer for conda. It is a small bootstrap version of Anaconda that includes only conda, Python, the packages they both depend on, and a small number of other useful packages (like pip, zlib, and a few others).",
"link": "https://docs.conda.io/projects/miniconda",
"panel": "1",
"winget": "Anaconda.Miniconda3"
},
"WPFInstalltemurin": {
"category": "Development",
"choco": "temurin",
"content": "Eclipse Temurin",
"description": "Eclipse Temurin is the open source Java SE build based upon OpenJDK.",
"link": "https://adoptium.net/temurin/",
"panel": "1",
"winget": "EclipseAdoptium.Temurin.21.JDK"
},
"WPFInstallintelpresentmon": {
"category": "Utilities",
"choco": "na",
"content": "Intel?? PresentMon",
"description": "A new gaming performance overlay and telemetry application to monitor and measure your gaming experience.",
"link": "https://game.intel.com/us/stories/intel-presentmon/",
"panel": "4",
"winget": "Intel.PresentMon.Beta"
},
"WPFInstallpyenvwin": {
"category": "Development",
"choco": "pyenv-win",
"content": "Python Version Manager (pyenv-win)",
"description": "pyenv for Windows is a simple python version management tool. It lets you easily switch between multiple versions of Python.",
"link": "https://pyenv-win.github.io/pyenv-win/",
"panel": "1",
"winget": "na"
}
}' | convertfrom-json }' | convertfrom-json
$sync.configs.dns = '{ $sync.configs.dns = '{
"Google":{ "Google":{
@ -7721,12 +7798,11 @@ $sync.configs.feature = '{
"NFS-Administration" "NFS-Administration"
], ],
"InvokeScript": [ "InvokeScript": [
"nfsadmin client stop "nfsadmin client stop",
Set-ItemProperty -Path ''HKLM:\\SOFTWARE\\Microsoft\\ClientForNFS\\CurrentVersion\\Default'' -Name ''AnonymousUID'' -Type DWord -Value 0 "Set-ItemProperty -Path ''HKLM:\\SOFTWARE\\Microsoft\\ClientForNFS\\CurrentVersion\\Default'' -Name ''AnonymousUID'' -Type DWord -Value 0",
Set-ItemProperty -Path ''HKLM:\\SOFTWARE\\Microsoft\\ClientForNFS\\CurrentVersion\\Default'' -Name ''AnonymousGID'' -Type DWord -Value 0 "Set-ItemProperty -Path ''HKLM:\\SOFTWARE\\Microsoft\\ClientForNFS\\CurrentVersion\\Default'' -Name ''AnonymousGID'' -Type DWord -Value 0",
nfsadmin client start "nfsadmin client start",
nfsadmin client localhost config fileaccess=755 SecFlavors=+sys -krb5 -krb5i "nfsadmin client localhost config fileaccess=755 SecFlavors=+sys -krb5 -krb5i"
"
] ]
}, },
"WPFFeatureEnableSearchSuggestions": { "WPFFeatureEnableSearchSuggestions": {
@ -7824,7 +7900,7 @@ $sync.configs.feature = '{
"category": "Features", "category": "Features",
"panel": "1", "panel": "1",
"Order": "a021_", "Order": "a021_",
"Description": "Windows Sandbox is a lightweight virtual machine that provides a temporary desktop environment to safely run applications and programs in isolation.", "Description": "Windows Sandbox is a lightweight virtual machine that provides a temporary desktop environment to safely run applications and programs in isolation."
}, },
"WPFFeatureInstall": { "WPFFeatureInstall": {
"Content": "Install Features", "Content": "Install Features",
@ -10619,6 +10695,14 @@ $sync.configs.tweaks = '{
"Order": "a066_", "Order": "a066_",
"Type": "Toggle" "Type": "Toggle"
}, },
"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": "a067_",
"Type": "Toggle"
},
"WPFchangedns": { "WPFchangedns": {
"Content": "DNS", "Content": "DNS",
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",