mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-07-08 11:29:58 +02:00
Add a per-script "Trigger on file types" editor (a SettingsExpander with an editable extensions box + Apply) on the PowerScripts page for file scripts. Applying calls a new host command, set-extensions <id> --ext <.md .txt ...>, which rewrites the manifest's input.extensions via the shared serializer, then re-registers the Explorer right-click submenu (uninstall old verbs first so a changed extension leaves nothing stale). list --json now surfaces input.extensions so the box shows current values. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
18 lines
576 B
C#
18 lines
576 B
C#
// Copyright (c) Microsoft Corporation
|
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
using System.Collections.Generic;
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
|
{
|
|
/// <summary>
|
|
/// The declared file-input contract for a script. Mirrors the <c>input</c> object emitted by
|
|
/// <c>PowerScripts.Host.exe list --json</c>.
|
|
/// </summary>
|
|
public sealed class PowerScriptInput
|
|
{
|
|
public List<string> Extensions { get; set; } = new();
|
|
}
|
|
}
|