mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add Windows Terminal to Shell Plugin
This commit is contained in:
parent
6cf7674cac
commit
f708ad9ffd
4 changed files with 36 additions and 1 deletions
|
|
@ -279,6 +279,33 @@ namespace Flow.Launcher.Plugin.Shell
|
|||
|
||||
break;
|
||||
}
|
||||
case Shell.TerminalPWSH:
|
||||
{
|
||||
info.filename = "wt.exe"
|
||||
info.ArgumentList.Add("pwsh");
|
||||
if (_settings.LeaveShellOpen)
|
||||
{
|
||||
info.ArgumentList.Add("-NoExit");
|
||||
}
|
||||
info.ArgumentList.Add("-Command");
|
||||
info.ArgumentList.Add(command);
|
||||
break;
|
||||
}
|
||||
case Shell.TerminalCMD:
|
||||
{
|
||||
info.filename = "wt.exe"
|
||||
info.ArgumentList.Add("cmd");
|
||||
if (_settings.LeaveShellOpen)
|
||||
{
|
||||
info.ArgumentList.Add("/k");
|
||||
}
|
||||
else
|
||||
{
|
||||
info.ArgumentList.Add("/c");
|
||||
}
|
||||
info.ArgumentList.Add(command);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,5 +39,7 @@ namespace Flow.Launcher.Plugin.Shell
|
|||
Powershell = 1,
|
||||
RunCommand = 2,
|
||||
Pwsh = 3,
|
||||
TerminalPWSH = 4,
|
||||
TerminalCMD = 5,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,12 +43,14 @@
|
|||
Content="{DynamicResource flowlauncher_plugin_cmd_always_run_as_administrator}" />
|
||||
<ComboBox
|
||||
x:Name="ShellComboBox"
|
||||
Grid.Row="4"
|
||||
Grid.Row="6"
|
||||
Margin="10,5,5,5"
|
||||
HorizontalAlignment="Left">
|
||||
<ComboBoxItem>CMD</ComboBoxItem>
|
||||
<ComboBoxItem>PowerShell</ComboBoxItem>
|
||||
<ComboBoxItem>Pwsh</ComboBoxItem>
|
||||
<ComboBoxItem>Terminal (Pwsh)</ComboBoxItem>
|
||||
<ComboBoxItem>Terminal (CMD)</ComboBoxItem>
|
||||
<ComboBoxItem>RunCommand</ComboBoxItem>
|
||||
</ComboBox>
|
||||
<StackPanel Grid.Row="5" Orientation="Horizontal">
|
||||
|
|
|
|||
|
|
@ -91,6 +91,8 @@ namespace Flow.Launcher.Plugin.Shell
|
|||
Shell.Cmd => 0,
|
||||
Shell.Powershell => 1,
|
||||
Shell.Pwsh => 2,
|
||||
Shell.TerminalPWSH = 3,
|
||||
Shell.TerminalCMD = 4,
|
||||
_ => ShellComboBox.Items.Count - 1
|
||||
};
|
||||
|
||||
|
|
@ -101,6 +103,8 @@ namespace Flow.Launcher.Plugin.Shell
|
|||
0 => Shell.Cmd,
|
||||
1 => Shell.Powershell,
|
||||
2 => Shell.Pwsh,
|
||||
3 => Shell.TerminalPWSH,
|
||||
4 => Shell.TerminalCMD,
|
||||
_ => Shell.RunCommand
|
||||
};
|
||||
LeaveShellOpen.IsEnabled = _settings.Shell != Shell.RunCommand;
|
||||
|
|
|
|||
Loading…
Reference in a new issue