Merge pull request #420 from hannesbraun/foot-support

Add support for foot
This commit is contained in:
leo 2024-08-28 10:11:55 +08:00 committed by GitHub
commit 9f9cea34f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -91,7 +91,7 @@ namespace SourceGit.Native
{ {
var dir = string.IsNullOrEmpty(workdir) ? "~" : workdir; var dir = string.IsNullOrEmpty(workdir) ? "~" : workdir;
if (_terminal == null) if (_terminal == null)
App.RaiseException(dir, $"Only supports gnome-terminal/konsole/xfce4-terminal/lxterminal/deepin-terminal!"); App.RaiseException(dir, $"Only supports gnome-terminal/konsole/xfce4-terminal/lxterminal/deepin-terminal/mate-terminal/foot!");
else else
_terminal.Open(dir); _terminal.Open(dir);
} }
@ -159,6 +159,10 @@ namespace SourceGit.Native
test = Path.Combine(path, "mate-terminal"); test = Path.Combine(path, "mate-terminal");
if (File.Exists(test)) if (File.Exists(test))
return new Terminal(test, "--working-directory=\"{0}\""); return new Terminal(test, "--working-directory=\"{0}\"");
test = Path.Combine(path, "foot");
if (File.Exists(test))
return new Terminal(test, "--working-directory=\"{0}\"");
} }
return null; return null;