[Run]New plugin to start other PowerToys (#24934)
* PowerToys plugin * bring setting window to foreground * resources * fix deep linking always opening general page * dll signing * setup * registry preview added * align registry preview icon and setup * fix setup * fix setup build * PR feedbacks addressed
@@ -0,0 +1,96 @@
|
||||
// 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;
|
||||
using System.Threading;
|
||||
using System.Windows.Input;
|
||||
using Common.UI;
|
||||
using interop;
|
||||
using Microsoft.PowerToys.Run.Plugin.PowerToys.Properties;
|
||||
using Wox.Infrastructure;
|
||||
using Wox.Plugin;
|
||||
|
||||
namespace Microsoft.PowerToys.Run.Plugin.PowerToys.Components
|
||||
{
|
||||
public class Utility
|
||||
{
|
||||
public UtilityKey Key { get; }
|
||||
|
||||
public string Name { get; }
|
||||
|
||||
public bool Enabled { get; private set; }
|
||||
|
||||
public Utility(UtilityKey key, string name, bool enabled)
|
||||
{
|
||||
Key = key;
|
||||
Name = name;
|
||||
Enabled = enabled;
|
||||
}
|
||||
|
||||
public Result CreateResult(MatchResult matchResult)
|
||||
{
|
||||
return new Result
|
||||
{
|
||||
Title = Name,
|
||||
SubTitle = Resources.Subtitle_Powertoys_Utility,
|
||||
IcoPath = UtilityHelper.GetIcoPath(Key),
|
||||
Action = UtilityHelper.GetAction(Key),
|
||||
ContextData = this,
|
||||
Score = matchResult.Score,
|
||||
TitleHighlightData = matchResult.MatchData,
|
||||
};
|
||||
}
|
||||
|
||||
public List<ContextMenuResult> CreateContextMenuResults()
|
||||
{
|
||||
var results = new List<ContextMenuResult>();
|
||||
|
||||
if (Key == UtilityKey.Hosts)
|
||||
{
|
||||
results.Add(new ContextMenuResult
|
||||
{
|
||||
Title = Resources.Action_Run_As_Administrator,
|
||||
Glyph = "\xE7EF",
|
||||
FontFamily = "Segoe MDL2 Assets",
|
||||
AcceleratorKey = System.Windows.Input.Key.Enter,
|
||||
AcceleratorModifiers = ModifierKeys.Control | ModifierKeys.Shift,
|
||||
Action = _ =>
|
||||
{
|
||||
using (var eventHandle = new EventWaitHandle(false, EventResetMode.AutoReset, Constants.ShowHostsAdminSharedEvent()))
|
||||
{
|
||||
eventHandle.Set();
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
var settingsWindow = UtilityHelper.GetSettingsWindow(Key);
|
||||
if (settingsWindow.HasValue)
|
||||
{
|
||||
results.Add(new ContextMenuResult
|
||||
{
|
||||
Title = Resources.Action_Open_Settings,
|
||||
Glyph = "\xE713",
|
||||
FontFamily = "Segoe MDL2 Assets",
|
||||
AcceleratorKey = System.Windows.Input.Key.S,
|
||||
AcceleratorModifiers = ModifierKeys.Control | ModifierKeys.Shift,
|
||||
Action = _ =>
|
||||
{
|
||||
SettingsDeepLink.OpenSettings(settingsWindow.Value);
|
||||
return true;
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
public void Enable(bool enabled)
|
||||
{
|
||||
Enabled = enabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
// 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;
|
||||
using System.Threading;
|
||||
using Common.UI;
|
||||
using interop;
|
||||
using Wox.Plugin;
|
||||
|
||||
namespace Microsoft.PowerToys.Run.Plugin.PowerToys.Components
|
||||
{
|
||||
public static class UtilityHelper
|
||||
{
|
||||
public static string GetIcoPath(UtilityKey key)
|
||||
{
|
||||
return key switch
|
||||
{
|
||||
UtilityKey.ColorPicker => "Images/ColorPicker.png",
|
||||
UtilityKey.FancyZones => "Images/FancyZones.png",
|
||||
UtilityKey.Hosts => "Images/Hosts.png",
|
||||
UtilityKey.MeasureTool => "Images/ScreenRuler.png",
|
||||
UtilityKey.PowerOCR => "Images/PowerOcr.png",
|
||||
UtilityKey.ShortcutGuide => "Images/ShortcutGuide.png",
|
||||
UtilityKey.RegistryPreview => "Images/RegistryPreview.png",
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
|
||||
public static SettingsDeepLink.SettingsWindow? GetSettingsWindow(UtilityKey key)
|
||||
{
|
||||
return key switch
|
||||
{
|
||||
UtilityKey.ColorPicker => SettingsDeepLink.SettingsWindow.ColorPicker,
|
||||
UtilityKey.FancyZones => SettingsDeepLink.SettingsWindow.FancyZones,
|
||||
UtilityKey.Hosts => SettingsDeepLink.SettingsWindow.Hosts,
|
||||
UtilityKey.MeasureTool => SettingsDeepLink.SettingsWindow.MeasureTool,
|
||||
UtilityKey.PowerOCR => SettingsDeepLink.SettingsWindow.PowerOCR,
|
||||
UtilityKey.ShortcutGuide => SettingsDeepLink.SettingsWindow.ShortcutGuide,
|
||||
UtilityKey.RegistryPreview => SettingsDeepLink.SettingsWindow.RegistryPreview,
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
|
||||
public static Func<ActionContext, bool> GetAction(UtilityKey key)
|
||||
{
|
||||
return (context) =>
|
||||
{
|
||||
switch (key)
|
||||
{
|
||||
case UtilityKey.ColorPicker: // Launch ColorPicker
|
||||
using (var eventHandle = new EventWaitHandle(false, EventResetMode.AutoReset, Constants.ShowColorPickerSharedEvent()))
|
||||
{
|
||||
eventHandle.Set();
|
||||
}
|
||||
|
||||
break;
|
||||
case UtilityKey.FancyZones: // Launch FancyZones Editor
|
||||
using (var eventHandle = new EventWaitHandle(false, EventResetMode.AutoReset, Constants.FZEToggleEvent()))
|
||||
{
|
||||
eventHandle.Set();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case UtilityKey.Hosts: // Launch Hosts
|
||||
{
|
||||
using (var eventHandle = new EventWaitHandle(false, EventResetMode.AutoReset, Constants.ShowHostsSharedEvent()))
|
||||
{
|
||||
eventHandle.Set();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case UtilityKey.MeasureTool: // Launch Screen Ruler
|
||||
using (var eventHandle = new EventWaitHandle(false, EventResetMode.AutoReset, Constants.MeasureToolTriggerEvent()))
|
||||
{
|
||||
eventHandle.Set();
|
||||
}
|
||||
|
||||
break;
|
||||
case UtilityKey.PowerOCR: // Launch Text Extractor
|
||||
using (var eventHandle = new EventWaitHandle(false, EventResetMode.AutoReset, Constants.ShowPowerOCRSharedEvent()))
|
||||
{
|
||||
eventHandle.Set();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case UtilityKey.ShortcutGuide: // Launch Shortcut Guide
|
||||
using (var eventHandle = new EventWaitHandle(false, EventResetMode.AutoReset, Constants.ShortcutGuideTriggerEvent()))
|
||||
{
|
||||
eventHandle.Set();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case UtilityKey.RegistryPreview: // Launch Registry Preview
|
||||
using (var eventHandle = new EventWaitHandle(false, EventResetMode.AutoReset, Constants.RegistryPreviewTriggerEvent()))
|
||||
{
|
||||
eventHandle.Set();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// 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.
|
||||
|
||||
namespace Microsoft.PowerToys.Run.Plugin.PowerToys.Components
|
||||
{
|
||||
public enum UtilityKey
|
||||
{
|
||||
ColorPicker = 0,
|
||||
FancyZones = 1,
|
||||
Hosts = 2,
|
||||
MeasureTool = 3,
|
||||
PowerOCR = 4,
|
||||
ShortcutGuide = 5,
|
||||
RegistryPreview = 6,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
// 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;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Microsoft.PowerToys.Run.Plugin.PowerToys.Components;
|
||||
using Microsoft.PowerToys.Run.Plugin.PowerToys.Properties;
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
using PowerToys.GPOWrapper;
|
||||
using Wox.Plugin.Logger;
|
||||
|
||||
namespace Microsoft.PowerToys.Run.Plugin.PowerToys
|
||||
{
|
||||
public class UtilityProvider : IDisposable
|
||||
{
|
||||
private const int MaxNumberOfRetry = 5;
|
||||
private readonly List<Utility> _utilities;
|
||||
private readonly FileSystemWatcher _watcher;
|
||||
private readonly object _loadingSettingsLock = new();
|
||||
private bool _disposed;
|
||||
|
||||
public UtilityProvider()
|
||||
{
|
||||
var settingsUtils = new SettingsUtils();
|
||||
var generalSettings = settingsUtils.GetSettings<GeneralSettings>();
|
||||
|
||||
_utilities = new List<Utility>();
|
||||
|
||||
if (GPOWrapper.GetConfiguredColorPickerEnabledValue() != GpoRuleConfigured.Disabled)
|
||||
{
|
||||
_utilities.Add(new Utility(UtilityKey.ColorPicker, Resources.Color_Picker, generalSettings.Enabled.ColorPicker));
|
||||
}
|
||||
|
||||
if (GPOWrapper.GetConfiguredFancyZonesEnabledValue() != GpoRuleConfigured.Disabled)
|
||||
{
|
||||
_utilities.Add(new Utility(UtilityKey.FancyZones, Resources.FancyZones_Editor, generalSettings.Enabled.FancyZones));
|
||||
}
|
||||
|
||||
if (GPOWrapper.GetConfiguredHostsFileEditorEnabledValue() != GpoRuleConfigured.Disabled)
|
||||
{
|
||||
_utilities.Add(new Utility(UtilityKey.Hosts, Resources.Hosts_File_Editor, generalSettings.Enabled.Hosts));
|
||||
}
|
||||
|
||||
if (GPOWrapper.GetConfiguredScreenRulerEnabledValue() != GpoRuleConfigured.Disabled)
|
||||
{
|
||||
_utilities.Add(new Utility(UtilityKey.MeasureTool, Resources.Screen_Ruler, generalSettings.Enabled.MeasureTool));
|
||||
}
|
||||
|
||||
if (GPOWrapper.GetConfiguredTextExtractorEnabledValue() != GpoRuleConfigured.Disabled)
|
||||
{
|
||||
_utilities.Add(new Utility(UtilityKey.PowerOCR, Resources.Text_Extractor, generalSettings.Enabled.PowerOCR));
|
||||
}
|
||||
|
||||
if (GPOWrapper.GetConfiguredShortcutGuideEnabledValue() != GpoRuleConfigured.Disabled)
|
||||
{
|
||||
_utilities.Add(new Utility(UtilityKey.ShortcutGuide, Resources.Shortcut_Guide, generalSettings.Enabled.ShortcutGuide));
|
||||
}
|
||||
|
||||
if (GPOWrapper.GetConfiguredRegistryPreviewEnabledValue() != GpoRuleConfigured.Disabled)
|
||||
{
|
||||
_utilities.Add(new Utility(UtilityKey.RegistryPreview, Resources.Registry_Preview, generalSettings.Enabled.RegistryPreview));
|
||||
}
|
||||
|
||||
_watcher = new FileSystemWatcher
|
||||
{
|
||||
Path = Path.GetDirectoryName(settingsUtils.GetSettingsFilePath()),
|
||||
Filter = Path.GetFileName(settingsUtils.GetSettingsFilePath()),
|
||||
NotifyFilter = NotifyFilters.LastWrite,
|
||||
};
|
||||
|
||||
_watcher.Changed += (s, e) => ReloadUtilities();
|
||||
_watcher.EnableRaisingEvents = true;
|
||||
}
|
||||
|
||||
public IEnumerable<Utility> GetEnabledUtilities()
|
||||
{
|
||||
return _utilities.Where(u => u.Enabled);
|
||||
}
|
||||
|
||||
private void ReloadUtilities()
|
||||
{
|
||||
lock (_loadingSettingsLock)
|
||||
{
|
||||
var retry = true;
|
||||
var retryCount = 0;
|
||||
|
||||
while (retry)
|
||||
{
|
||||
try
|
||||
{
|
||||
retryCount++;
|
||||
|
||||
var settingsUtils = new SettingsUtils();
|
||||
var generalSettings = settingsUtils.GetSettings<GeneralSettings>();
|
||||
|
||||
foreach (var u in _utilities)
|
||||
{
|
||||
switch (u.Key)
|
||||
{
|
||||
case UtilityKey.ColorPicker: u.Enable(generalSettings.Enabled.ColorPicker); break;
|
||||
case UtilityKey.FancyZones: u.Enable(generalSettings.Enabled.FancyZones); break;
|
||||
case UtilityKey.Hosts: u.Enable(generalSettings.Enabled.Hosts); break;
|
||||
case UtilityKey.PowerOCR: u.Enable(generalSettings.Enabled.PowerOCR); break;
|
||||
case UtilityKey.MeasureTool: u.Enable(generalSettings.Enabled.MeasureTool); break;
|
||||
case UtilityKey.ShortcutGuide: u.Enable(generalSettings.Enabled.ShortcutGuide); break;
|
||||
case UtilityKey.RegistryPreview: u.Enable(generalSettings.Enabled.RegistryPreview); break;
|
||||
}
|
||||
}
|
||||
|
||||
retry = false;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (retryCount > MaxNumberOfRetry)
|
||||
{
|
||||
Log.Exception("Failed to read changed settings", ex, typeof(UtilityProvider));
|
||||
retry = false;
|
||||
}
|
||||
|
||||
Thread.Sleep(500);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(disposing: true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (!_disposed)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
_watcher?.Dispose();
|
||||
_disposed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 968 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 921 B |
|
After Width: | Height: | Size: 329 B |
|
After Width: | Height: | Size: 320 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,74 @@
|
||||
// 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;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.PowerToys.Run.Plugin.PowerToys.Components;
|
||||
using Microsoft.PowerToys.Run.Plugin.PowerToys.Properties;
|
||||
using Wox.Infrastructure;
|
||||
using Wox.Plugin;
|
||||
|
||||
namespace Microsoft.PowerToys.Run.Plugin.PowerToys
|
||||
{
|
||||
public class Main : IPlugin, IPluginI18n, IContextMenu, IDisposable
|
||||
{
|
||||
private UtilityProvider _utilityProvider;
|
||||
private bool _disposed;
|
||||
|
||||
public string Name => Resources.Plugin_Name;
|
||||
|
||||
public string Description => Resources.Plugin_Description;
|
||||
|
||||
public string GetTranslatedPluginTitle() => Resources.Plugin_Name;
|
||||
|
||||
public string GetTranslatedPluginDescription() => Resources.Plugin_Description;
|
||||
|
||||
public void Init(PluginInitContext context)
|
||||
{
|
||||
_utilityProvider = new UtilityProvider();
|
||||
}
|
||||
|
||||
public List<ContextMenuResult> LoadContextMenus(Result selectedResult)
|
||||
{
|
||||
return selectedResult.ContextData is Utility u
|
||||
? u.CreateContextMenuResults()
|
||||
: new List<ContextMenuResult>();
|
||||
}
|
||||
|
||||
public List<Result> Query(Query query)
|
||||
{
|
||||
var results = new List<Result>();
|
||||
|
||||
foreach (var utility in _utilityProvider.GetEnabledUtilities())
|
||||
{
|
||||
var matchResult = StringMatcher.FuzzySearch(query.Search, utility.Name);
|
||||
if (string.IsNullOrWhiteSpace(query.Search) || matchResult.Score > 0)
|
||||
{
|
||||
results.Add(utility.CreateResult(matchResult));
|
||||
}
|
||||
}
|
||||
|
||||
return results.OrderBy(r => r.Title).ToList();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(disposing: true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (!_disposed)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
_utilityProvider?.Dispose();
|
||||
_disposed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\..\..\..\Version.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
|
||||
<RootNamespace>Microsoft.PowerToys.Run.Plugin.PowerToys</RootNamespace>
|
||||
<AssemblyName>Microsoft.PowerToys.Run.Plugin.PowerToys</AssemblyName>
|
||||
<Version>$(Version).0</Version>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
||||
<GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
|
||||
<OutputPath>..\..\..\..\..\$(Platform)\$(Configuration)\modules\launcher\Plugins\PowerToys\</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
|
||||
<PropertyGroup>
|
||||
<CsWinRTIncludes>PowerToys.GPOWrapper</CsWinRTIncludes>
|
||||
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
|
||||
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<Optimize>false</Optimize>
|
||||
<DebugType>full</DebugType>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
|
||||
<ProjectReference Include="..\..\Wox.Infrastructure\Wox.Infrastructure.csproj" />
|
||||
<ProjectReference Include="..\..\Wox.Plugin\Wox.Plugin.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="plugin.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Windows.CsWinRT" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Images\ColorPicker.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Images\FancyZones.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Images\Hosts.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Images\PowerOcr.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Images\PowerToys.dark.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Images\PowerToys.light.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Images\RegistryPreview.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Images\ScreenRuler.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Images\ShortcutGuide.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
171
src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.PowerToys/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,171 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Microsoft.PowerToys.Run.Plugin.PowerToys.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.PowerToys.Run.Plugin.PowerToys.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Open settings (Ctrl+Shift+S).
|
||||
/// </summary>
|
||||
internal static string Action_Open_Settings {
|
||||
get {
|
||||
return ResourceManager.GetString("Action_Open_Settings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Run as administrator (Ctrl+Shift+Enter).
|
||||
/// </summary>
|
||||
internal static string Action_Run_As_Administrator {
|
||||
get {
|
||||
return ResourceManager.GetString("Action_Run_As_Administrator", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Color Picker.
|
||||
/// </summary>
|
||||
internal static string Color_Picker {
|
||||
get {
|
||||
return ResourceManager.GetString("Color_Picker", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to FancyZones Editor.
|
||||
/// </summary>
|
||||
internal static string FancyZones_Editor {
|
||||
get {
|
||||
return ResourceManager.GetString("FancyZones_Editor", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Hosts File Editor.
|
||||
/// </summary>
|
||||
internal static string Hosts_File_Editor {
|
||||
get {
|
||||
return ResourceManager.GetString("Hosts_File_Editor", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Open PowerToys utilities and settings..
|
||||
/// </summary>
|
||||
internal static string Plugin_Description {
|
||||
get {
|
||||
return ResourceManager.GetString("Plugin_Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to PowerToys.
|
||||
/// </summary>
|
||||
internal static string Plugin_Name {
|
||||
get {
|
||||
return ResourceManager.GetString("Plugin_Name", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Registry Preview.
|
||||
/// </summary>
|
||||
internal static string Registry_Preview {
|
||||
get {
|
||||
return ResourceManager.GetString("Registry_Preview", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Screen Ruler.
|
||||
/// </summary>
|
||||
internal static string Screen_Ruler {
|
||||
get {
|
||||
return ResourceManager.GetString("Screen_Ruler", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Shortcut Guide.
|
||||
/// </summary>
|
||||
internal static string Shortcut_Guide {
|
||||
get {
|
||||
return ResourceManager.GetString("Shortcut_Guide", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to PowerToys Utility.
|
||||
/// </summary>
|
||||
internal static string Subtitle_Powertoys_Utility {
|
||||
get {
|
||||
return ResourceManager.GetString("Subtitle_Powertoys_Utility", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Text Extractor.
|
||||
/// </summary>
|
||||
internal static string Text_Extractor {
|
||||
get {
|
||||
return ResourceManager.GetString("Text_Extractor", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Action_Open_Settings" xml:space="preserve">
|
||||
<value>Open settings (Ctrl+Shift+S)</value>
|
||||
</data>
|
||||
<data name="Action_Run_As_Administrator" xml:space="preserve">
|
||||
<value>Run as administrator (Ctrl+Shift+Enter)</value>
|
||||
</data>
|
||||
<data name="Color_Picker" xml:space="preserve">
|
||||
<value>Color Picker</value>
|
||||
<comment>"Color Picker" is the name of the utility</comment>
|
||||
</data>
|
||||
<data name="FancyZones_Editor" xml:space="preserve">
|
||||
<value>FancyZones Editor</value>
|
||||
<comment>"FancyZones" is the name of the utility</comment>
|
||||
</data>
|
||||
<data name="Hosts_File_Editor" xml:space="preserve">
|
||||
<value>Hosts File Editor</value>
|
||||
<comment>"Hosts File Editor" is the name of the utility</comment>
|
||||
</data>
|
||||
<data name="Plugin_Description" xml:space="preserve">
|
||||
<value>Open PowerToys utilities and settings.</value>
|
||||
</data>
|
||||
<data name="Plugin_Name" xml:space="preserve">
|
||||
<value>PowerToys</value>
|
||||
</data>
|
||||
<data name="Registry_Preview" xml:space="preserve">
|
||||
<value>Registry Preview</value>
|
||||
<comment>"Registry Preview" is the name of the utility</comment>
|
||||
</data>
|
||||
<data name="Screen_Ruler" xml:space="preserve">
|
||||
<value>Screen Ruler</value>
|
||||
<comment>"Screen Ruler" is the name of the utility</comment>
|
||||
</data>
|
||||
<data name="Shortcut_Guide" xml:space="preserve">
|
||||
<value>Shortcut Guide</value>
|
||||
<comment>"Shortcut Guide" is the name of the utility</comment>
|
||||
</data>
|
||||
<data name="Subtitle_Powertoys_Utility" xml:space="preserve">
|
||||
<value>PowerToys Utility</value>
|
||||
</data>
|
||||
<data name="Text_Extractor" xml:space="preserve">
|
||||
<value>Text Extractor</value>
|
||||
<comment>"Text Extractor" is the name of the utility</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"ID": "29DD65DB28C84A37BDEF1D2B43DA368B",
|
||||
"Disabled": true,
|
||||
"ActionKeyword": "@",
|
||||
"IsGlobal": true,
|
||||
"Name": "PowerToys",
|
||||
"Author": "davidegiacometti",
|
||||
"Version": "1.0.0",
|
||||
"Language": "csharp",
|
||||
"Website": "https://aka.ms/powertoys",
|
||||
"ExecuteFileName": "Microsoft.PowerToys.Run.Plugin.PowerToys.dll",
|
||||
"IcoPathDark": "Images\\PowerToys.dark.png",
|
||||
"IcoPathLight": "Images\\PowerToys.light.png"
|
||||
}
|
||||