From 4a97ea7cd0d2190624b08901cc4479ba7e3c8b9e Mon Sep 17 00:00:00 2001 From: Shawn Salat <31082405+ThinkSalat@users.noreply.github.com> Date: Tue, 11 Apr 2023 14:34:31 -0600 Subject: [PATCH 1/2] add Terminal to shell pulgin settings --- Plugins/Flow.Launcher.Plugin.Shell/Main.cs | 16 ++++++++++++++++ Plugins/Flow.Launcher.Plugin.Shell/Settings.cs | 1 + 2 files changed, 17 insertions(+) diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs index f64f5d37675..c4d00e398ba 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs @@ -234,6 +234,22 @@ private ProcessStartInfo PrepareProcessStartInfo(string command, bool runAsAdmin } break; } + + case Shell.Terminal: + { + info.FileName = "wt.exe"; + if (_settings.LeaveShellOpen) + { + info.ArgumentList.Add("-NoExit"); + info.ArgumentList.Add(command); + } + else + { + info.ArgumentList.Add("-Command"); + info.ArgumentList.Add(command); + } + break; + } case Shell.RunCommand: { diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Settings.cs b/Plugins/Flow.Launcher.Plugin.Shell/Settings.cs index a3cac1cb873..f97c19eadc5 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.Shell/Settings.cs @@ -36,6 +36,7 @@ public enum Shell Cmd = 0, Powershell = 1, RunCommand = 2, + Terminal = 3, } } From 416e48da84e2e7a8cc52b5a9080da0cef473bddb Mon Sep 17 00:00:00 2001 From: Shawn Salat <31082405+ThinkSalat@users.noreply.github.com> Date: Wed, 12 Apr 2023 00:48:43 -0600 Subject: [PATCH 2/2] Add Terminal to menu entries --- Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml b/Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml index 39fb21c59cb..8b114805107 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml +++ b/Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml @@ -42,6 +42,7 @@ CMD PowerShell RunCommand + Terminal