mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 03:36:44 +02:00
[PowerToys Run] Plugin manager (#9872)
This commit is contained in:
@@ -15,7 +15,7 @@ using Wox.Plugin;
|
||||
|
||||
namespace Microsoft.Plugin.Folder
|
||||
{
|
||||
public class Main : IPlugin, ISettingProvider, IPluginI18n, ISavable, IContextMenu, IDisposable
|
||||
public class Main : IPlugin, IPluginI18n, ISavable, IContextMenu, IDisposable
|
||||
{
|
||||
public const string FolderImagePath = "Images\\folder.dark.png";
|
||||
public const string FileImagePath = "Images\\file.dark.png";
|
||||
@@ -38,6 +38,10 @@ namespace Microsoft.Plugin.Folder
|
||||
private IContextMenu _contextMenuLoader;
|
||||
private bool _disposed;
|
||||
|
||||
public string Name => Properties.Resources.wox_plugin_folder_plugin_name;
|
||||
|
||||
public string Description => Properties.Resources.wox_plugin_folder_plugin_description;
|
||||
|
||||
public void Save()
|
||||
{
|
||||
_storage.Save();
|
||||
@@ -119,10 +123,6 @@ namespace Microsoft.Plugin.Folder
|
||||
return _contextMenuLoader.LoadContextMenus(selectedResult);
|
||||
}
|
||||
|
||||
public void UpdateSettings(PowerLauncherSettings settings)
|
||||
{
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(disposing: true);
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace Microsoft.Plugin.Folder.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Open favorite folder from PowerToys Run directly.
|
||||
/// Looks up a localized string similar to Navigates folders starting from a drive letter 'C:\' or from the user home '~'..
|
||||
/// </summary>
|
||||
public static string wox_plugin_folder_plugin_description {
|
||||
get {
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
<value>Folder</value>
|
||||
</data>
|
||||
<data name="wox_plugin_folder_plugin_description" xml:space="preserve">
|
||||
<value>Open favorite folder from PowerToys Run directly</value>
|
||||
<value>Navigates folders starting from a drive letter 'C:\' or from the user home '~'.</value>
|
||||
</data>
|
||||
<data name="Microsoft_plugin_folder_copy_path" xml:space="preserve">
|
||||
<value>Copy path (Ctrl+C)</value>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
"ActionKeyword": "",
|
||||
"IsGlobal": true,
|
||||
"Name": "Folder",
|
||||
"Description": "Search and open folders",
|
||||
"Author": "qianlifeng",
|
||||
"Version": "1.0.0",
|
||||
"Language": "csharp",
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace Microsoft.Plugin.Indexer
|
||||
{
|
||||
internal class Main : ISettingProvider, IPlugin, ISavable, IPluginI18n, IContextMenu, IDisposable, IDelayedExecutionPlugin
|
||||
{
|
||||
private const string DisableDriveDetectionWarning = nameof(DisableDriveDetectionWarning);
|
||||
private static readonly IFileSystem _fileSystem = new FileSystem();
|
||||
|
||||
// This variable contains metadata about the Plugin
|
||||
@@ -46,6 +47,20 @@ namespace Microsoft.Plugin.Indexer
|
||||
|
||||
private string WarningIconPath { get; set; }
|
||||
|
||||
public string Name => Properties.Resources.Microsoft_plugin_indexer_plugin_name;
|
||||
|
||||
public string Description => Properties.Resources.Microsoft_plugin_indexer_plugin_description;
|
||||
|
||||
public IEnumerable<PluginAdditionalOption> AdditionalOptions => new List<PluginAdditionalOption>()
|
||||
{
|
||||
new PluginAdditionalOption()
|
||||
{
|
||||
Key = DisableDriveDetectionWarning,
|
||||
DisplayLabel = Properties.Resources.disable_drive_detection_warning,
|
||||
Value = false,
|
||||
},
|
||||
};
|
||||
|
||||
private IContextMenu _contextMenuLoader;
|
||||
private bool disposedValue;
|
||||
|
||||
@@ -210,9 +225,10 @@ namespace Microsoft.Plugin.Indexer
|
||||
return _contextMenuLoader.LoadContextMenus(selectedResult);
|
||||
}
|
||||
|
||||
public void UpdateSettings(PowerLauncherSettings settings)
|
||||
public void UpdateSettings(PowerLauncherPluginSettings settings)
|
||||
{
|
||||
_driveDetection.IsDriveDetectionWarningCheckBoxSelected = settings.Properties.DisableDriveDetectionWarning;
|
||||
var option = settings.AdditionalOptions.FirstOrDefault(x => x.Key == DisableDriveDetectionWarning);
|
||||
_driveDetection.IsDriveDetectionWarningCheckBoxSelected = option == null ? false : option.Value;
|
||||
}
|
||||
|
||||
public Control CreateSettingPanel()
|
||||
|
||||
@@ -60,6 +60,15 @@ namespace Microsoft.Plugin.Indexer.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Disable drive detection warning.
|
||||
/// </summary>
|
||||
public static string disable_drive_detection_warning {
|
||||
get {
|
||||
return ResourceManager.GetString("disable_drive_detection_warning", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Fail to set text in clipboard.
|
||||
/// </summary>
|
||||
@@ -151,7 +160,7 @@ namespace Microsoft.Plugin.Indexer.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Returns files and folders.
|
||||
/// Looks up a localized string similar to Searches files and folders..
|
||||
/// </summary>
|
||||
public static string Microsoft_plugin_indexer_plugin_description {
|
||||
get {
|
||||
@@ -160,7 +169,7 @@ namespace Microsoft.Plugin.Indexer.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Windows Indexer.
|
||||
/// Looks up a localized string similar to Windows Search.
|
||||
/// </summary>
|
||||
public static string Microsoft_plugin_indexer_plugin_name {
|
||||
get {
|
||||
|
||||
@@ -151,12 +151,15 @@
|
||||
<value>Fail to open folder at</value>
|
||||
</data>
|
||||
<data name="Microsoft_plugin_indexer_plugin_description" xml:space="preserve">
|
||||
<value>Returns files and folders</value>
|
||||
<value>Searches files and folders.</value>
|
||||
</data>
|
||||
<data name="Microsoft_plugin_indexer_plugin_name" xml:space="preserve">
|
||||
<value>Windows Indexer</value>
|
||||
<value>Windows Search</value>
|
||||
</data>
|
||||
<data name="Microsoft_plugin_indexer_subtitle_header" xml:space="preserve">
|
||||
<value>Search</value>
|
||||
</data>
|
||||
<data name="disable_drive_detection_warning" xml:space="preserve">
|
||||
<value>Disable drive detection warning</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -3,7 +3,6 @@
|
||||
"ActionKeyword": "?",
|
||||
"IsGlobal": true,
|
||||
"Name": "Windows Indexer",
|
||||
"Description": "Search for files and folders",
|
||||
"Author": "Microsoft",
|
||||
"Version": "1.0.0",
|
||||
"Language": "csharp",
|
||||
|
||||
@@ -32,10 +32,7 @@ namespace Microsoft.Plugin.Program.UnitTests.ProgramArgumentParser
|
||||
new NoArgumentsArgumentParser(),
|
||||
};
|
||||
|
||||
// basic version of the Quey parser which can be found at Wox.Core.Plugin.QueryBuilder but did not want to create a project reference
|
||||
var splittedSearchString = inputQuery?.Split(Query.TermSeparator, System.StringSplitOptions.RemoveEmptyEntries);
|
||||
var cleanQuery = string.Join(Query.TermSeparator, splittedSearchString);
|
||||
var query = new Query(cleanQuery, cleanQuery, new ReadOnlyCollection<string>(splittedSearchString), string.Empty);
|
||||
var query = new Query(inputQuery);
|
||||
|
||||
// Act
|
||||
string program = null, programArguments = null;
|
||||
|
||||
@@ -32,6 +32,10 @@ namespace Microsoft.Plugin.Program
|
||||
|
||||
internal static ProgramPluginSettings Settings { get; set; }
|
||||
|
||||
public string Name => Properties.Resources.wox_plugin_program_plugin_name;
|
||||
|
||||
public string Description => Properties.Resources.wox_plugin_program_plugin_description;
|
||||
|
||||
private static PluginInitContext _context;
|
||||
private readonly PluginJsonStorage<ProgramPluginSettings> _settingsStorage;
|
||||
private bool _disposed;
|
||||
|
||||
@@ -178,7 +178,7 @@ namespace Microsoft.Plugin.Program.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Search programs in PowerToys Run.
|
||||
/// Looks up a localized string similar to Searches programs..
|
||||
/// </summary>
|
||||
public static string wox_plugin_program_plugin_description {
|
||||
get {
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
<value>Program</value>
|
||||
</data>
|
||||
<data name="wox_plugin_program_plugin_description" xml:space="preserve">
|
||||
<value>Search programs in PowerToys Run</value>
|
||||
<value>Searches programs.</value>
|
||||
</data>
|
||||
<data name="powertoys_run_plugin_program_win32_application" xml:space="preserve">
|
||||
<value>Application</value>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
"ActionKeyword": ".",
|
||||
"IsGlobal": true,
|
||||
"Name": "Program",
|
||||
"Description": "Search for programs",
|
||||
"Author": "qianlifeng",
|
||||
"Version": "1.0.0",
|
||||
"Language": "csharp",
|
||||
|
||||
@@ -22,7 +22,7 @@ using Control = System.Windows.Controls.Control;
|
||||
|
||||
namespace Microsoft.Plugin.Shell
|
||||
{
|
||||
public class Main : IPlugin, ISettingProvider, IPluginI18n, IContextMenu, ISavable
|
||||
public class Main : IPlugin, IPluginI18n, IContextMenu, ISavable
|
||||
{
|
||||
private static readonly IFileSystem FileSystem = new FileSystem();
|
||||
private static readonly IPath Path = FileSystem.Path;
|
||||
@@ -34,6 +34,10 @@ namespace Microsoft.Plugin.Shell
|
||||
|
||||
private string IconPath { get; set; }
|
||||
|
||||
public string Name => Properties.Resources.wox_plugin_cmd_plugin_name;
|
||||
|
||||
public string Description => Properties.Resources.wox_plugin_cmd_plugin_description;
|
||||
|
||||
private PluginInitContext _context;
|
||||
|
||||
public Main()
|
||||
@@ -331,9 +335,5 @@ namespace Microsoft.Plugin.Shell
|
||||
|
||||
return resultlist;
|
||||
}
|
||||
|
||||
public void UpdateSettings(PowerLauncherSettings settings)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace Microsoft.Plugin.Shell.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Allows to execute system commands from PowerToys Run. Commands should start with >.
|
||||
/// Looks up a localized string similar to Executes commands (e.g 'ping', 'cmd')..
|
||||
/// </summary>
|
||||
public static string wox_plugin_cmd_plugin_description {
|
||||
get {
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
<value>Shell</value>
|
||||
</data>
|
||||
<data name="wox_plugin_cmd_plugin_description" xml:space="preserve">
|
||||
<value>Allows to execute system commands from PowerToys Run. Commands should start with ></value>
|
||||
<value>Executes commands (e.g 'ping', 'cmd').</value>
|
||||
</data>
|
||||
<data name="wox_plugin_cmd_cmd_has_been_executed_times" xml:space="preserve">
|
||||
<value>this command has been executed {0} times</value>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
"ActionKeyword": ">",
|
||||
"IsGlobal": false,
|
||||
"Name": "Shell",
|
||||
"Description": "Provide executing commands. Commands should start with >",
|
||||
"Author": "qianlifeng",
|
||||
"Version": "1.0.0",
|
||||
"Language": "csharp",
|
||||
|
||||
@@ -43,6 +43,10 @@ namespace Microsoft.Plugin.Uri
|
||||
|
||||
public PluginInitContext Context { get; protected set; }
|
||||
|
||||
public string Name => Properties.Resources.Microsoft_plugin_uri_plugin_name;
|
||||
|
||||
public string Description => Properties.Resources.Microsoft_plugin_uri_plugin_description;
|
||||
|
||||
public List<ContextMenuResult> LoadContextMenus(Result selectedResult)
|
||||
{
|
||||
return new List<ContextMenuResult>(0);
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Microsoft.Plugin.Uri.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Handles urls.
|
||||
/// Looks up a localized string similar to Opens URLs and UNC network shares..
|
||||
/// </summary>
|
||||
public static string Microsoft_plugin_uri_plugin_description {
|
||||
get {
|
||||
@@ -79,7 +79,7 @@ namespace Microsoft.Plugin.Uri.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Url Handler.
|
||||
/// Looks up a localized string similar to URI Handler.
|
||||
/// </summary>
|
||||
public static string Microsoft_plugin_uri_plugin_name {
|
||||
get {
|
||||
|
||||
@@ -121,10 +121,10 @@
|
||||
<value>Failed to open URL</value>
|
||||
</data>
|
||||
<data name="Microsoft_plugin_uri_plugin_description" xml:space="preserve">
|
||||
<value>Handles urls</value>
|
||||
<value>Opens URLs and UNC network shares.</value>
|
||||
</data>
|
||||
<data name="Microsoft_plugin_uri_plugin_name" xml:space="preserve">
|
||||
<value>Url Handler</value>
|
||||
<value>URI Handler</value>
|
||||
</data>
|
||||
<data name="Microsoft_plugin_uri_website" xml:space="preserve">
|
||||
<value>Open in browser</value>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
"ActionKeyword": "//",
|
||||
"IsGlobal": true,
|
||||
"Name": "Windows Uri Handler",
|
||||
"Description": "Handles urls",
|
||||
"Author": "Microsoft",
|
||||
"Version": "1.0.0",
|
||||
"Language": "csharp",
|
||||
|
||||
@@ -19,6 +19,10 @@ namespace Microsoft.Plugin.WindowWalker
|
||||
|
||||
private PluginInitContext Context { get; set; }
|
||||
|
||||
public string Name => Properties.Resources.wox_plugin_windowwalker_plugin_name;
|
||||
|
||||
public string Description => Properties.Resources.wox_plugin_windowwalker_plugin_description;
|
||||
|
||||
static Main()
|
||||
{
|
||||
SearchController.Instance.OnSearchResultUpdateEventHandler += SearchResultUpdated;
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Microsoft.Plugin.WindowWalker.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Alt-Tab alternative enabling searching through your windows..
|
||||
/// Looks up a localized string similar to Switches between open windows..
|
||||
/// </summary>
|
||||
public static string wox_plugin_windowwalker_plugin_description {
|
||||
get {
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
<value>Window Walker</value>
|
||||
</data>
|
||||
<data name="wox_plugin_windowwalker_plugin_description" xml:space="preserve">
|
||||
<value>Alt-Tab alternative enabling searching through your windows.</value>
|
||||
<value>Switches between open windows.</value>
|
||||
</data>
|
||||
<data name="wox_plugin_windowwalker_running" xml:space="preserve">
|
||||
<value>Running</value>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
"ActionKeyword": "<",
|
||||
"IsGlobal": true,
|
||||
"Name": "Window Walker",
|
||||
"Description": "Alt-Tab alternative enabling searching through your windows.",
|
||||
"Author": "betadele",
|
||||
"Version": "1.0.0",
|
||||
"Language": "csharp",
|
||||
|
||||
@@ -19,6 +19,10 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
|
||||
|
||||
private string IconPath { get; set; }
|
||||
|
||||
public string Name => Properties.Resources.wox_plugin_calculator_plugin_name;
|
||||
|
||||
public string Description => Properties.Resources.wox_plugin_calculator_plugin_description;
|
||||
|
||||
private bool _disposed;
|
||||
|
||||
public List<Result> Query(Query query)
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Microsoft.PowerToys.Run.Plugin.Calculator.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
@@ -20,15 +23,15 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.Properties {
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
public 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>
|
||||
@@ -42,7 +45,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.Properties {
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
@@ -56,7 +59,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.Properties {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Copy failed, please try later.
|
||||
/// </summary>
|
||||
@@ -65,7 +68,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.Properties {
|
||||
return ResourceManager.GetString("wox_plugin_calculator_copy_failed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Copy this number to the clipboard.
|
||||
/// </summary>
|
||||
@@ -74,7 +77,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.Properties {
|
||||
return ResourceManager.GetString("wox_plugin_calculator_copy_number_to_clipboard", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Expression wrong or incomplete (Did you forget some parentheses?).
|
||||
/// </summary>
|
||||
@@ -83,7 +86,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.Properties {
|
||||
return ResourceManager.GetString("wox_plugin_calculator_expression_not_complete", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Not a number (NaN).
|
||||
/// </summary>
|
||||
@@ -92,16 +95,16 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.Properties {
|
||||
return ResourceManager.GetString("wox_plugin_calculator_not_a_number", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Allows you to do mathematical calculations. (Try 5*3-2 in PowerToys Run).
|
||||
/// Looks up a localized string similar to Does mathematical calculations (e.g. 5*3-2)..
|
||||
/// </summary>
|
||||
public static string wox_plugin_calculator_plugin_description {
|
||||
get {
|
||||
return ResourceManager.GetString("wox_plugin_calculator_plugin_description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Calculator.
|
||||
/// </summary>
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
<value>Calculator</value>
|
||||
</data>
|
||||
<data name="wox_plugin_calculator_plugin_description" xml:space="preserve">
|
||||
<value>Allows you to do mathematical calculations. (Try 5*3-2 in PowerToys Run)</value>
|
||||
<value>Does mathematical calculations (e.g. 5*3-2).</value>
|
||||
</data>
|
||||
<data name="wox_plugin_calculator_not_a_number" xml:space="preserve">
|
||||
<value>Not a number (NaN)</value>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
"ActionKeyword": "=",
|
||||
"IsGlobal": true,
|
||||
"Name": "Calculator",
|
||||
"Description": "Provide mathematical calculations.(Try 5*3-2 in PowerToys)",
|
||||
"Author": "cxfksword",
|
||||
"Version": "1.0.0",
|
||||
"Language": "csharp",
|
||||
|
||||
@@ -42,6 +42,10 @@ namespace Microsoft.PowerToys.Run.Plugin.Registry
|
||||
/// </summary>
|
||||
private bool _disposed;
|
||||
|
||||
public string Name => Resources.PluginTitle;
|
||||
|
||||
public string Description => Resources.PluginDescription;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Main"/> class.
|
||||
/// </summary>
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Registry.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Search inside the Windows Registry.
|
||||
/// Looks up a localized string similar to Navigates inside the Windows Registry..
|
||||
/// </summary>
|
||||
internal static string PluginDescription {
|
||||
get {
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
<value>Registry Plugin</value>
|
||||
</data>
|
||||
<data name="PluginDescription" xml:space="preserve">
|
||||
<value>Search inside the Windows Registry</value>
|
||||
<value>Navigates inside the Windows Registry.</value>
|
||||
<comment>"this built into Windows the OS. translate accordingly, https://docs.microsoft.com/de-de/troubleshoot/windows-server/performance/windows-registry-advanced-users is an example of it translated in German"</comment>
|
||||
</data>
|
||||
<data name="CopyKeyNamePath" xml:space="preserve">
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
"ActionKeyword": ":",
|
||||
"IsGlobal": false,
|
||||
"Name": "Registry",
|
||||
"Description": "Search inside the Windows Registry",
|
||||
"Author": "TobiasSekan",
|
||||
"Version": "1.0.0",
|
||||
"Language": "csharp",
|
||||
|
||||
@@ -19,6 +19,10 @@ namespace Microsoft.PowerToys.Run.Plugin.Service
|
||||
private PluginInitContext _context;
|
||||
private string _icoPath;
|
||||
|
||||
public string Name => Resources.wox_plugin_service_plugin_name;
|
||||
|
||||
public string Description => Resources.wox_plugin_service_plugin_description;
|
||||
|
||||
public void Init(PluginInitContext context)
|
||||
{
|
||||
_context = context;
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Service.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Manages Windows services.
|
||||
/// Looks up a localized string similar to Manages Windows services..
|
||||
/// </summary>
|
||||
internal static string wox_plugin_service_plugin_description {
|
||||
get {
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
<value>Pausing</value>
|
||||
</data>
|
||||
<data name="wox_plugin_service_plugin_description" xml:space="preserve">
|
||||
<value>Manages Windows services</value>
|
||||
<value>Manages Windows services.</value>
|
||||
</data>
|
||||
<data name="wox_plugin_service_plugin_name" xml:space="preserve">
|
||||
<value>Service</value>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
"ActionKeyword": "!",
|
||||
"IsGlobal": false,
|
||||
"Name": "Service",
|
||||
"Description": "Manages Windows services",
|
||||
"Author": "davidegiacometti",
|
||||
"Version": "1.0.0",
|
||||
"Language": "csharp",
|
||||
|
||||
@@ -32,8 +32,7 @@ namespace Microsoft.PowerToys.Run.Plugin.System.UnitTests
|
||||
// Setup
|
||||
Mock<Main> main = new Mock<Main>();
|
||||
main.Object.IconTheme = "dark";
|
||||
string[] terms = { typedString };
|
||||
Query expectedQuery = new Query(typedString, typedString, new ReadOnlyCollection<string>(terms), string.Empty);
|
||||
Query expectedQuery = new Query(typedString);
|
||||
|
||||
// Act
|
||||
var result = main.Object.Query(expectedQuery).FirstOrDefault().IcoPath;
|
||||
@@ -54,8 +53,7 @@ namespace Microsoft.PowerToys.Run.Plugin.System.UnitTests
|
||||
// Setup
|
||||
Mock<Main> main = new Mock<Main>();
|
||||
main.Object.IconTheme = "light";
|
||||
string[] terms = { typedString };
|
||||
Query expectedQuery = new Query(typedString, typedString, new ReadOnlyCollection<string>(terms), string.Empty);
|
||||
Query expectedQuery = new Query(typedString);
|
||||
|
||||
// Act
|
||||
var result = main.Object.Query(expectedQuery).FirstOrDefault().IcoPath;
|
||||
|
||||
@@ -30,8 +30,7 @@ namespace Microsoft.PowerToys.Run.Plugin.System.UnitTests
|
||||
{
|
||||
// Setup
|
||||
Mock<Main> main = new Mock<Main>();
|
||||
string[] terms = { typedString };
|
||||
Query expectedQuery = new Query(typedString, typedString, new ReadOnlyCollection<string>(terms), string.Empty);
|
||||
Query expectedQuery = new Query(typedString);
|
||||
|
||||
// Act
|
||||
var result = main.Object.Query(expectedQuery).FirstOrDefault().SubTitle;
|
||||
|
||||
@@ -26,6 +26,10 @@ namespace Microsoft.PowerToys.Run.Plugin.System
|
||||
|
||||
public string IconTheme { get; set; }
|
||||
|
||||
public string Name => Properties.Resources.Microsoft_plugin_sys_plugin_name;
|
||||
|
||||
public string Description => Properties.Resources.Microsoft_plugin_sys_plugin_description;
|
||||
|
||||
public void Init(PluginInitContext context)
|
||||
{
|
||||
this._context = context;
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace Microsoft.PowerToys.Run.Plugin.System.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Provides Windows related commands, shutdown, lock, sleep .....
|
||||
/// Looks up a localized string similar to Executes system commands (e.g. 'shutdown', 'lock', 'sleep')..
|
||||
/// </summary>
|
||||
internal static string Microsoft_plugin_sys_plugin_description {
|
||||
get {
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
<comment>This should align to the action in Windows of a locking your computer.</comment>
|
||||
</data>
|
||||
<data name="Microsoft_plugin_sys_plugin_description" xml:space="preserve">
|
||||
<value>Provides Windows related commands, shutdown, lock, sleep ....</value>
|
||||
<value>Executes system commands (e.g. 'shutdown', 'lock', 'sleep').</value>
|
||||
<comment>This should align to the actions in Windows relating to shutting down, signing out, locking, sleeping, restarting, emptying the recycle bin, and hibernating your computer. </comment>
|
||||
</data>
|
||||
<data name="Microsoft_plugin_sys_plugin_name" xml:space="preserve">
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
"ActionKeyword": "",
|
||||
"IsGlobal": true,
|
||||
"Name": "System Commands",
|
||||
"Description": "Provide System related commands. e.g. shutdown,lock,setting etc.",
|
||||
"Author": "Wox",
|
||||
"Version": "1.0.0",
|
||||
"Language": "csharp",
|
||||
|
||||
Reference in New Issue
Block a user