[DSC]Improve samples (#32494)

* Add DSC sample to install and configure

* [DSC]Make configure action depend on install

* [DSC]Add schema header for yaml-language-server

* Use full resource name for quick finding by winget

* Add index page to the DSC sample files
This commit is contained in:
Jaime Bernardo
2024-04-17 17:55:09 +01:00
committed by GitHub
parent db767a06ad
commit 31df322f70
6 changed files with 61 additions and 12 deletions

View File

@@ -0,0 +1,26 @@
# PowerToys Desired State Configuration samples
This folder contains samples of DSC files that can be used to configure PowerToys.
> [!NOTE]
> PowerToys DSC user documentation can be found on [Learn Microsoft PowerToys documentation](https://aka.ms/powertoys-docs-dsc-configure).
### [configuration.dsc.yaml](./configuration.dsc.yaml)
Sample configuration file that changes the enabled state of some modules, changes an integer setting and a hotkey setting.
### [installAndConfiguration.dsc.yaml](./installAndConfiguration.dsc.yaml)
Installs PowerToys and applies configuration.dsc.yaml to it.
### [enableAllModules.dsc.yaml](./enableAllModules.dsc.yaml)
Enables all PowerToys utilities.
### [disableAllModules.dsc.yaml](./disableAllModules.dsc.yaml)
Disables all PowerToys utilities.
### [configureLauncherPlugins.dsc.yaml](./configureLauncherPlugins.dsc.yaml)
Enables PowerToys Run and all its plugins and changes action keyword and global state for the Program plugin.

View File

@@ -1,14 +1,7 @@
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
properties:
resources:
# - resource: Microsoft.WinGet.DSC/WinGetPackage
# directives:
# description: Install PowerToys
# allowPrerelease: true
# settings:
# id: PowerToys (Preview)
# source: winget
- resource: PowerToysConfigure
- resource: Microsoft.PowerToys.Configure/PowerToysConfigure
directives:
description: Configure PowerToys
settings:

View File

@@ -1,6 +1,7 @@
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
properties:
resources:
- resource: PowerToysConfigure
- resource: Microsoft.PowerToys.Configure/PowerToysConfigure
directives:
description: Configure PowerToys
settings:

View File

@@ -1,6 +1,7 @@
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
properties:
resources:
- resource: PowerToysConfigure
- resource: Microsoft.PowerToys.Configure/PowerToysConfigure
directives:
description: Configure PowerToys
settings:

View File

@@ -1,6 +1,7 @@
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
properties:
resources:
- resource: PowerToysConfigure
- resource: Microsoft.PowerToys.Configure/PowerToysConfigure
directives:
description: Configure PowerToys
settings:

View File

@@ -0,0 +1,27 @@
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
properties:
resources:
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: installPowerToys
directives:
description: Install PowerToys
allowPrerelease: true
settings:
id: Microsoft.PowerToys
source: winget
- resource: Microsoft.PowerToys.Configure/PowerToysConfigure
dependsOn:
- installPowerToys
directives:
description: Configure PowerToys
settings:
ShortcutGuide:
Enabled: false
OverlayOpacity: 50
FancyZones:
Enabled: true
FancyzonesEditorHotkey: "Shift+Ctrl+Alt+F"
FileLocksmith:
Enabled: false
configurationVersion: 0.2.0