Skip to content

Commit 7092263

Browse files
authored
Merge pull request #429 from taooceros/SpecialCtrl
Add special ctrl for Pluginsmanager and Shell plugin
2 parents 86598b5 + 4cb8f92 commit 7092263

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,12 @@ internal async ValueTask<List<Result>> RequestInstallOrUpdate(string searchName,
318318
IcoPath = icoPath,
319319
Action = e =>
320320
{
321+
if (e.SpecialKeyState.CtrlPressed)
322+
{
323+
SearchWeb.NewTabInBrowser(x.Website);
324+
return ShouldHideWindow;
325+
}
326+
321327
Application.Current.MainWindow.Hide();
322328
_ = InstallOrUpdate(x); // No need to wait
323329
return ShouldHideWindow;

Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"Name": "Plugins Manager",
77
"Description": "Management of installing, uninstalling or updating Flow Launcher plugins",
88
"Author": "Jeremy Wu",
9-
"Version": "1.7.2",
9+
"Version": "1.8.0",
1010
"Language": "csharp",
1111
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
1212
"ExecuteFileName": "Flow.Launcher.Plugin.PluginsManager.dll",

Plugins/Flow.Launcher.Plugin.Shell/Main.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public List<Result> Query(Query query)
8686
IcoPath = Image,
8787
Action = c =>
8888
{
89-
Execute(Process.Start, PrepareProcessStartInfo(m));
89+
Execute(Process.Start, PrepareProcessStartInfo(m, c.SpecialKeyState.CtrlPressed));
9090
return true;
9191
}
9292
}));
@@ -182,7 +182,7 @@ private ProcessStartInfo PrepareProcessStartInfo(string command, bool runAsAdmin
182182
if (_settings.Shell == Shell.Cmd)
183183
{
184184
var arguments = _settings.LeaveShellOpen ? $"/k \"{command}\"" : $"/c \"{command}\" & pause";
185-
185+
186186
info = ShellCommand.SetProcessStartInfo("cmd.exe", workingDirectory, arguments, runAsAdministratorArg);
187187
}
188188
else if (_settings.Shell == Shell.Powershell)
@@ -232,19 +232,19 @@ private ProcessStartInfo PrepareProcessStartInfo(string command, bool runAsAdmin
232232
return info;
233233
}
234234

235-
private void Execute(Func<ProcessStartInfo, Process> startProcess,ProcessStartInfo info)
235+
private void Execute(Func<ProcessStartInfo, Process> startProcess, ProcessStartInfo info)
236236
{
237237
try
238238
{
239-
startProcess(info);
239+
startProcess(info);
240240
}
241241
catch (FileNotFoundException e)
242242
{
243243
var name = "Plugin: Shell";
244244
var message = $"Command not found: {e.Message}";
245245
context.API.ShowMsg(name, message);
246246
}
247-
catch(Win32Exception e)
247+
catch (Win32Exception e)
248248
{
249249
var name = "Plugin: Shell";
250250
var message = $"Error running the command: {e.Message}";

Plugins/Flow.Launcher.Plugin.Shell/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"Name": "Shell",
55
"Description": "Provide executing commands from Flow Launcher",
66
"Author": "qianlifeng",
7-
"Version": "1.3.2",
7+
"Version": "1.4.0",
88
"Language": "csharp",
99
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
1010
"ExecuteFileName": "Flow.Launcher.Plugin.Shell.dll",

0 commit comments

Comments
 (0)