Merge pull request #495 from Gama11/feature/wezterm

Add support for WezTerm
This commit is contained in:
leo 2024-09-20 21:51:59 +08:00 committed by GitHub
commit e011b1807a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 0 deletions

View file

@ -54,6 +54,7 @@ namespace SourceGit.Models
new ShellOrTerminal("deepin-terminal", "Deepin Terminal", "deepin-terminal"), new ShellOrTerminal("deepin-terminal", "Deepin Terminal", "deepin-terminal"),
new ShellOrTerminal("mate-terminal", "MATE Terminal", "mate-terminal"), new ShellOrTerminal("mate-terminal", "MATE Terminal", "mate-terminal"),
new ShellOrTerminal("foot", "Foot", "foot"), new ShellOrTerminal("foot", "Foot", "foot"),
new ShellOrTerminal("wezterm", "WezTerm", "wezterm"),
new ShellOrTerminal("custom", "Custom", ""), new ShellOrTerminal("custom", "Custom", ""),
}; };
} }

View file

@ -71,6 +71,9 @@ namespace SourceGit.Native
startInfo.WorkingDirectory = string.IsNullOrEmpty(workdir) ? home : workdir; startInfo.WorkingDirectory = string.IsNullOrEmpty(workdir) ? home : workdir;
startInfo.FileName = OS.ShellOrTerminal; startInfo.FileName = OS.ShellOrTerminal;
if (OS.ShellOrTerminal.EndsWith("wezterm", StringComparison.OrdinalIgnoreCase))
startInfo.Arguments = $"start --cwd \"{workdir}\"";
try try
{ {
Process.Start(startInfo); Process.Start(startInfo);

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB