diff --git a/app/src/main/java/io/xpipe/app/terminal/KittyTerminalType.java b/app/src/main/java/io/xpipe/app/terminal/KittyTerminalType.java index 10dbc81ac..5e384096b 100644 --- a/app/src/main/java/io/xpipe/app/terminal/KittyTerminalType.java +++ b/app/src/main/java/io/xpipe/app/terminal/KittyTerminalType.java @@ -177,10 +177,13 @@ public interface KittyTerminalType extends ExternalTerminalType { return false; } + var time = System.currentTimeMillis(); sc.executeSimpleCommand(CommandBuilder.of() .add("open", "-a", "kitty.app", "--args") .add("-o", "allow_remote_control=socket-only", "--listen-on", "unix:" + getSocket())); - ThreadHelper.sleep(1000); + var elapsed = System.currentTimeMillis() - time; + // Good heuristic on how long to wait + ThreadHelper.sleep(5 * elapsed); return true; } } diff --git a/app/src/main/java/io/xpipe/app/util/NativeBridge.java b/app/src/main/java/io/xpipe/app/util/NativeBridge.java index 1add6e4cb..b062bc384 100644 --- a/app/src/main/java/io/xpipe/app/util/NativeBridge.java +++ b/app/src/main/java/io/xpipe/app/util/NativeBridge.java @@ -1,7 +1,9 @@ package io.xpipe.app.util; +import io.xpipe.app.core.AppProperties; import io.xpipe.app.issue.ErrorEvent; import io.xpipe.core.process.OsType; +import io.xpipe.core.util.ModuleHelper; import io.xpipe.core.util.XPipeInstallation; import com.sun.jna.Library; @@ -24,6 +26,10 @@ public class NativeBridge { } public static Optional getMacOsLibrary() { + if (!ModuleHelper.isImage() || !AppProperties.get().isFullVersion()) { + return Optional.empty(); + } + if (macOsLibrary == null && !loadingFailed) { try { System.setProperty(