Skip to content

Commit bfea573

Browse files
committed
feature: supports mate-terminal on Linux
1 parent 1972e26 commit bfea573

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

src/Native/Linux.cs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,7 @@ public void OpenInFileManager(string path, bool select)
9393
{
9494
var dir = Path.GetDirectoryName(path);
9595
if (Directory.Exists(dir))
96-
{
9796
Process.Start(_xdgOpenPath, $"\"{dir}\"");
98-
}
9997
}
10098
}
10199

@@ -133,9 +131,7 @@ private string FindExecutable(string filename)
133131
{
134132
var test = Path.Combine(path, filename);
135133
if (File.Exists(test))
136-
{
137134
return test;
138-
}
139135
}
140136

141137
return string.Empty;
@@ -149,33 +145,27 @@ private Terminal FindTerminal()
149145
{
150146
var test = Path.Combine(path, "gnome-terminal");
151147
if (File.Exists(test))
152-
{
153148
return new Terminal(test, "--working-directory=\"{0}\"");
154-
}
155149

156150
test = Path.Combine(path, "konsole");
157151
if (File.Exists(test))
158-
{
159152
return new Terminal(test, "--workdir \"{0}\"");
160-
}
161153

162154
test = Path.Combine(path, "xfce4-terminal");
163155
if (File.Exists(test))
164-
{
165156
return new Terminal(test, "--working-directory=\"{0}\"");
166-
}
167157

168158
test = Path.Combine(path, "lxterminal");
169159
if (File.Exists(test))
170-
{
171160
return new Terminal(test, "--working-directory=\"{0}\"");
172-
}
173161

174162
test = Path.Combine(path, "deepin-terminal");
175163
if (File.Exists(test))
176-
{
177164
return new Terminal(test, "--work-directory \"{0}\"");
178-
}
165+
166+
test = Path.Combine(path, "mate-terminal");
167+
if (File.Exists(test))
168+
return new Terminal(test, "--working-directory=\"{0}\"");
179169
}
180170

181171
return null;

0 commit comments

Comments
 (0)