mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-04-03 17:52:10 +00:00
converted tweak-buttons to use applications.json
This commit is contained in:
parent
d9865ced92
commit
ad6936337b
@ -225,5 +225,43 @@
|
|||||||
"Installzoom": {
|
"Installzoom": {
|
||||||
"winget": "Zoom.Zoom"
|
"winget": "Zoom.Zoom"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Preset": {
|
||||||
|
"desktop": [
|
||||||
|
"EssTweaksAH",
|
||||||
|
"EssTweaksDVR",
|
||||||
|
"EssTweaksHiber",
|
||||||
|
"EssTweaksHome",
|
||||||
|
"EssTweaksLoc",
|
||||||
|
"EssTweaksOO",
|
||||||
|
"EssTweaksRP",
|
||||||
|
"EssTweaksServices",
|
||||||
|
"EssTweaksStorage",
|
||||||
|
"EssTweaksTele",
|
||||||
|
"EssTweaksWifi",
|
||||||
|
"MiscTweaksPower",
|
||||||
|
"MiscTweaksNum"
|
||||||
|
],
|
||||||
|
"laptop": [
|
||||||
|
"EssTweaksAH",
|
||||||
|
"EssTweaksDVR",
|
||||||
|
"EssTweaksHome",
|
||||||
|
"EssTweaksLoc",
|
||||||
|
"EssTweaksOO",
|
||||||
|
"EssTweaksRP",
|
||||||
|
"EssTweaksServices",
|
||||||
|
"EssTweaksStorage",
|
||||||
|
"EssTweaksTele",
|
||||||
|
"EssTweaksWifi",
|
||||||
|
"MiscTweaksLapPower",
|
||||||
|
"MiscTweaksLapNum"
|
||||||
|
],
|
||||||
|
"minimal": [
|
||||||
|
"EssTweaksHome",
|
||||||
|
"EssTweaksOO",
|
||||||
|
"EssTweaksRP",
|
||||||
|
"EssTweaksServices",
|
||||||
|
"EssTweaksTele"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,48 +137,8 @@ $xaml.SelectNodes("//*[@Name]") | ForEach-Object {$global:sync["$("$($_.Name)")"
|
|||||||
Function Tweak-Buttons {
|
Function Tweak-Buttons {
|
||||||
Param ($button)
|
Param ($button)
|
||||||
|
|
||||||
if ($button -eq "desktop"){
|
$preset = $global:sync["applications"].preset.$button
|
||||||
$preset = @(
|
|
||||||
"EssTweaksAH"
|
|
||||||
"EssTweaksDVR"
|
|
||||||
"EssTweaksHiber"
|
|
||||||
"EssTweaksHome"
|
|
||||||
"EssTweaksLoc"
|
|
||||||
"EssTweaksOO"
|
|
||||||
"EssTweaksRP"
|
|
||||||
"EssTweaksServices"
|
|
||||||
"EssTweaksStorage"
|
|
||||||
"EssTweaksTele"
|
|
||||||
"EssTweaksWifi"
|
|
||||||
"MiscTweaksPower"
|
|
||||||
"MiscTweaksNum"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
if ($button -eq "laptop"){
|
|
||||||
$preset = @(
|
|
||||||
"EssTweaksAH"
|
|
||||||
"EssTweaksDVR"
|
|
||||||
"EssTweaksHome"
|
|
||||||
"EssTweaksLoc"
|
|
||||||
"EssTweaksOO"
|
|
||||||
"EssTweaksRP"
|
|
||||||
"EssTweaksServices"
|
|
||||||
"EssTweaksStorage"
|
|
||||||
"EssTweaksTele"
|
|
||||||
"EssTweaksWifi"
|
|
||||||
"MiscTweaksLapPower"
|
|
||||||
"MiscTweaksLapNum"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
if ($button -eq "minimal"){
|
|
||||||
$preset = @(
|
|
||||||
"EssTweaksHome"
|
|
||||||
"EssTweaksOO"
|
|
||||||
"EssTweaksRP"
|
|
||||||
"EssTweaksServices"
|
|
||||||
"EssTweaksTele"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
$global:sync.keys | Where-Object {$_ -like "*tweaks*" -and $_ -notlike "tweaksbutton"} | ForEach-Object {
|
$global:sync.keys | Where-Object {$_ -like "*tweaks*" -and $_ -notlike "tweaksbutton"} | ForEach-Object {
|
||||||
if ($preset -contains $_ ){$global:sync["$_"].IsChecked = $True}
|
if ($preset -contains $_ ){$global:sync["$_"].IsChecked = $True}
|
||||||
Else{$global:sync["$_"].IsChecked = $false}
|
Else{$global:sync["$_"].IsChecked = $false}
|
||||||
|
Loading…
Reference in New Issue
Block a user