Skip to content

Commit

Permalink
Handle GNOME Terminal quirk
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeIsMeh committed Sep 3, 2022
1 parent d8b108d commit 71c390a
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions src/file_item.vala
Original file line number Diff line number Diff line change
Expand Up @@ -235,23 +235,26 @@ public class FileItem : DesktopItem {
// terminator supports --new-tab and -e, --working-directory (no -w) WITH equal
// xfce4-terminal supports -e, --tab, --window, and --working-directory (no -w) WITH equal

switch (preferred_terminal) {
// Terminals that use --tab
case "gnome-terminal":
case "mate-terminal":
case "xfce4-terminal":
args += "--tab";
break;

// Terminals that use --new-tab
case "konsole":
case "terminator":
args += "--new-tab";
break;

// Terminals that don't support tabs
default:
break;
if ((preferred_terminal == "gnome-terminal") && (_type == "file")) {
args += "--tab";
} else {
switch (preferred_terminal) {
// Terminals that use --tab
case "mate-terminal":
case "xfce4-terminal":
args += "--tab";
break;

// Terminals that use --new-tab
case "konsole":
case "terminator":
args += "--new-tab";
break;

// Terminals that don't support tabs
default:
break;
}
}

string path = file.get_path();
Expand Down

0 comments on commit 71c390a

Please sign in to comment.