lin-ycv / EverythingPowerToys

Everything search plugin for PowerToys Run
Eclipse Public License 2.0
2.2k stars 57 forks source link

💡 winget DSC deployment #98

Closed akamienski closed 4 months ago

akamienski commented 4 months ago

Is your feature request related to a problem? Please describe. Plugin deployed with PowerToys DSC deployment using winget.

Describe the solution you'd like Either as winget PowerToys deployment, where I can define to install plugin as well, or seperately while installing Everything plugin with winget.

Additional context I'd like to change default activation command and few other settings.

lin-ycv commented 4 months ago

Is there something I need to implement? From what I can tell, DSC is handled by powertoys itself.

You have to create a YAML for the configurations that you want, and call that YAML using winget configure instead of winget install

lin-ycv commented 4 months ago

@akamienski can you provide more information? Does it currently not work? Can you provide your YAML file that you're using?

akamienski commented 4 months ago

@lin-ycv Yes it worked, so what I've done is added plugin as a resource to be installed after powertoys deployment, defined it in PowerToysConfigure.Settings as part of PowerLauncher, with ActionKeyword assigned. So this is how it should look like to work:

properties:
  resources:
    - resource: Microsoft.WinGet.DSC/WinGetPackage
      directives:
        description: Install PowerToys
        allowPrerelease: true
      settings:
        id: Microsoft.PowerToys
        source: winget
    - resource: Microsoft.WinGet.DSC/WinGetPackage
      directives:
        description: Install Everything
        allowPrerelease: true
      settings:
        id: lin-ycv.EverythingPowerToys
        source: winget
    - resource: PowerToysConfigure
      directives:
        description: Configure PowerToys
      settings:
        (...)
        PowerLauncher:
          Enabled: true
          OpenPowerLauncher: "Ctrl+Space"
          UseCentralizedKeyboardHook: true
          SearchQueryTuningEnabled: true
          IgnoreHotkeysInFullscreen: false
          GenerateThumbnailsFromFiles: false
          TabSelectsContextButtons: true
          Position: "Focus"
          Plugins:
            - Name: "Calculator"
              Disabled: false
            - Name: "Folder"
              Disabled: false
            - Name: "Program"
              Disabled: false
              IsGlobal: true
            - Name: "Registry Plugin"
              Disabled: false
            - Name: "Service"
              Disabled: false
            - Name: "Shell"
              Disabled: false
            - Name: "Windows System Commands"
              Disabled: false
            - Name: "URI Handler"
              Disabled: false
            - Name: "Web Search"
              Disabled: false
            - Name: "Windows settings"
              Disabled: false
              ActionKeyword: ","
              IsGlobal: false
            - Name: "Everything"
              Disabled: false
              ActionKeyword: "?"
        (...)
  configurationVersion: 0.2.0

FYI dsc doesn't allow you to define plugin specific settings yet, only global ones, like Name, Disabled, IsGlobal, ActionKeyword and WeightBoost.