mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-05-24 00:07:41 -04:00
wezterm fixes
This commit is contained in:
@@ -104,12 +104,12 @@ public interface WezTerminalType extends ExternalTerminalType, TrackableTerminal
|
||||
@Override
|
||||
public void launch(TerminalLaunchConfiguration configuration) throws Exception {
|
||||
boolean runGui = true;
|
||||
var flatpak = FlatpakCache.getApp("org.wezfurlong.wezterm");
|
||||
if (configuration.isPreferTabs()) {
|
||||
CommandBuilder base;
|
||||
if (CommandSupport.isInLocalPath("wezterm")) {
|
||||
base = CommandBuilder.of().addFile("wezterm");
|
||||
} else {
|
||||
var flatpak = FlatpakCache.getApp("org.wezfurlong.wezterm");
|
||||
if (flatpak.isPresent()) {
|
||||
base = CommandBuilder.of().add("flatpak", "run").addQuoted("org.wezfurlong.wezterm");
|
||||
} else {
|
||||
@@ -117,7 +117,6 @@ public interface WezTerminalType extends ExternalTerminalType, TrackableTerminal
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
runGui = !LocalShell.getShell()
|
||||
.command(CommandBuilder.of()
|
||||
.add(base)
|
||||
@@ -127,8 +126,18 @@ public interface WezTerminalType extends ExternalTerminalType, TrackableTerminal
|
||||
}
|
||||
|
||||
if (runGui) {
|
||||
CommandBuilder base;
|
||||
if (CommandSupport.isInLocalPath("wezterm-gui")) {
|
||||
base = CommandBuilder.of().addFile("wezterm-gui");
|
||||
} else {
|
||||
if (flatpak.isPresent()) {
|
||||
base = CommandBuilder.of().add("flatpak", "run").addQuoted("org.wezfurlong.wezterm");
|
||||
} else {
|
||||
base = CommandBuilder.of().addFile("wezterm-gui");
|
||||
}
|
||||
}
|
||||
ExternalApplicationHelper.startAsync(
|
||||
CommandBuilder.of().addFile("wezterm-gui").add("start").addFile(configuration.getScriptFile()));
|
||||
CommandBuilder.of().add(base).add("start").addFile(configuration.getScriptFile()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user