mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
[CmdPal] Windows Services restart kb shortcuts (#38150)
* [CmdPal] Windows Services open/restart kb shortcuts * Given both restart and stop has its shortcut, only do for open with the shortcut "ctr+o"
This commit is contained in:
@@ -13,6 +13,7 @@ using Microsoft.CmdPal.Ext.WindowsServices.Properties;
|
||||
using Microsoft.CommandPalette.Extensions;
|
||||
using Microsoft.CommandPalette.Extensions.Toolkit;
|
||||
using Microsoft.Win32;
|
||||
using Windows.System;
|
||||
|
||||
namespace Microsoft.CmdPal.Ext.WindowsServices.Helpers;
|
||||
|
||||
@@ -53,7 +54,10 @@ public static class ServiceHelper
|
||||
serviceCommand = new ServiceCommand(serviceResult, Action.Stop);
|
||||
moreCommands = [
|
||||
new CommandContextItem(new RestartServiceCommand(serviceResult)),
|
||||
new CommandContextItem(new OpenServicesCommand(serviceResult)),
|
||||
new CommandContextItem(new OpenServicesCommand(serviceResult))
|
||||
{
|
||||
RequestedShortcut = KeyChordHelpers.FromModifiers(true, false, false, false, (int)VirtualKey.O, 0),
|
||||
},
|
||||
];
|
||||
}
|
||||
else
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
<value>Name</value>
|
||||
</data>
|
||||
<data name="wox_plugin_service_open_services" xml:space="preserve">
|
||||
<value>Open services (Ctrl+O)</value>
|
||||
<value>Open services</value>
|
||||
</data>
|
||||
<data name="wox_plugin_service_paused" xml:space="preserve">
|
||||
<value>Paused</value>
|
||||
@@ -142,7 +142,7 @@
|
||||
<value>Service</value>
|
||||
</data>
|
||||
<data name="wox_plugin_service_restart" xml:space="preserve">
|
||||
<value>Restart (Ctrl+R)</value>
|
||||
<value>Restart</value>
|
||||
</data>
|
||||
<data name="wox_plugin_service_restarted_notification" xml:space="preserve">
|
||||
<value>The service has been restarted</value>
|
||||
|
||||
Reference in New Issue
Block a user