mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-27 23:11:23 +08:00
f: address review comments
This commit is contained in:
parent
cd69d09235
commit
92d373f43e
1
.gitignore
vendored
1
.gitignore
vendored
@ -33,7 +33,6 @@ bld/
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# Auto generated files that must be placed in a directory without spaces
|
||||
Generated/
|
||||
|
||||
# MSTest test Results
|
||||
|
@ -89,9 +89,7 @@ If it's imported successfully, you could also try to invoke it directly:
|
||||
Invoke-DscResource -Name PowerToysConfigure -Method Set -ModuleName Microsoft.PowerToys.Configure -Property @{ Debug = $true; Awake = @{ Enabled = $false; Mode = "TIMED"; IntervalMinutes = "10" } }
|
||||
```
|
||||
|
||||
Note that we've supplied `Debug` option, so a `%TEMP\TestConfigure.txt` is created with the supplied properties, a current timestamp, and other debug output.
|
||||
|
||||
Also, please make sure that the full path to `Microsoft.PowerToys.Configure.psm1` doesn't contain any spaces, otherwise PowerShell won't be able to invoke the resource.
|
||||
Note that we've supplied `Debug` option, so a `%TEMP\PowerToys.DSC.TestConfigure.txt` is created with the supplied properties, a current timestamp, and other debug output.
|
||||
|
||||
Finally, you can test it with winget by invoking it as such:
|
||||
|
||||
|
@ -12,11 +12,13 @@ properties:
|
||||
directives:
|
||||
description: Configure PowerToys
|
||||
settings:
|
||||
Debug: true
|
||||
Debug: false
|
||||
ShortcutGuide:
|
||||
Enabled: false
|
||||
OverlayOpacity: 50
|
||||
FancyZones:
|
||||
Enabled: false
|
||||
Enabled: true
|
||||
FancyzonesEditorHotkey: "Shift+Ctrl+Alt+F"
|
||||
FileLocksmith:
|
||||
Enabled: false
|
||||
configurationVersion: 0.2.0
|
||||
|
@ -4,7 +4,7 @@ properties:
|
||||
directives:
|
||||
description: Configure PowerToys
|
||||
settings:
|
||||
Debug: true
|
||||
Debug: false
|
||||
PowerLauncher:
|
||||
Enabled: true
|
||||
AdditionalProperties:
|
||||
|
@ -4,7 +4,7 @@ properties:
|
||||
directives:
|
||||
description: Configure PowerToys
|
||||
settings:
|
||||
Debug: true
|
||||
Debug: false
|
||||
AlwaysOnTop:
|
||||
Enabled: false
|
||||
Awake:
|
||||
@ -19,8 +19,6 @@ properties:
|
||||
Enabled: false
|
||||
FileLocksmith:
|
||||
Enabled: false
|
||||
PowerPreview:
|
||||
Enabled: false
|
||||
ImageResizer:
|
||||
Enabled: false
|
||||
KeyboardManager:
|
||||
|
@ -4,7 +4,7 @@ properties:
|
||||
directives:
|
||||
description: Configure PowerToys
|
||||
settings:
|
||||
Debug: true
|
||||
Debug: false
|
||||
AlwaysOnTop:
|
||||
Enabled: true
|
||||
Awake:
|
||||
@ -19,8 +19,6 @@ properties:
|
||||
Enabled: true
|
||||
FileLocksmith:
|
||||
Enabled: true
|
||||
PowerPreview:
|
||||
Enabled: true
|
||||
ImageResizer:
|
||||
Enabled: true
|
||||
KeyboardManager:
|
||||
|
@ -286,7 +286,7 @@ class {{module.Name}} {
|
||||
$SettingsValues = Get-Content -Path $SettingsTmpFilePath -Raw
|
||||
|
||||
if ($this.Debug -eq $true) {
|
||||
$TempFilePath = Join-Path -Path $env:TEMP -ChildPath "TestConfigure.txt"
|
||||
$TempFilePath = Join-Path -Path $env:TEMP -ChildPath "PowerToys.DSC.TestConfigure.txt"
|
||||
Set-Content -Path "$TempFilePath" -Value ("Requested:`r`n" + $settingsJson + "`r`n" + "Got:`r`n" + $SettingsValues + "`r`n" + (Get-Date -Format "o")) -Force
|
||||
}
|
||||
|
||||
@ -320,10 +320,14 @@ class {{module.Name}} {
|
||||
$tmp_info = $ChangesToApply
|
||||
# $tmp_info = $this | ConvertTo-Json -Depth 10
|
||||
|
||||
$TempFilePath = Join-Path -Path $env:TEMP -ChildPath "TestConfigure.txt"
|
||||
$TempFilePath = Join-Path -Path $env:TEMP -ChildPath "PowerToys.DSC.TestConfigure.txt"
|
||||
Set-Content -Path "$TempFilePath" -Value ($tmp_info + "`r`n" + (Get-Date -Format "o")) -Force
|
||||
}
|
||||
|
||||
# Stop any running PowerToys instances
|
||||
Stop-Process -Name "PowerToys.Settings" -PassThru | Wait-Process
|
||||
Stop-Process -Name "PowerToys" -PassThru | Wait-Process
|
||||
|
||||
foreach ($change in $ChangesToApply) {
|
||||
Start-Process -FilePath $SettingsExePath -Wait -Args "$change"
|
||||
}
|
||||
|
@ -9,7 +9,6 @@
|
||||
<WindowsPackageType>None</WindowsPackageType>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
||||
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
|
||||
<SelfContained>true</SelfContained>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -29,7 +29,6 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
public IntProperty OverlayOpacity { get; set; }
|
||||
|
||||
[JsonPropertyName("use_legacy_press_win_key_behavior")]
|
||||
[CmdConfigureIgnoreAttribute]
|
||||
public BoolProperty UseLegacyPressWinKeyBehavior { get; set; }
|
||||
|
||||
[JsonPropertyName("press_time")]
|
||||
|
Loading…
Reference in New Issue
Block a user