mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 09:00:26 +00:00
macOS fixes
This commit is contained in:
parent
14867ba09c
commit
a49077cc09
2 changed files with 10 additions and 1 deletions
|
@ -177,10 +177,13 @@ public interface KittyTerminalType extends ExternalTerminalType {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var time = System.currentTimeMillis();
|
||||||
sc.executeSimpleCommand(CommandBuilder.of()
|
sc.executeSimpleCommand(CommandBuilder.of()
|
||||||
.add("open", "-a", "kitty.app", "--args")
|
.add("open", "-a", "kitty.app", "--args")
|
||||||
.add("-o", "allow_remote_control=socket-only", "--listen-on", "unix:" + getSocket()));
|
.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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
package io.xpipe.app.util;
|
package io.xpipe.app.util;
|
||||||
|
|
||||||
|
import io.xpipe.app.core.AppProperties;
|
||||||
import io.xpipe.app.issue.ErrorEvent;
|
import io.xpipe.app.issue.ErrorEvent;
|
||||||
import io.xpipe.core.process.OsType;
|
import io.xpipe.core.process.OsType;
|
||||||
|
import io.xpipe.core.util.ModuleHelper;
|
||||||
import io.xpipe.core.util.XPipeInstallation;
|
import io.xpipe.core.util.XPipeInstallation;
|
||||||
|
|
||||||
import com.sun.jna.Library;
|
import com.sun.jna.Library;
|
||||||
|
@ -24,6 +26,10 @@ public class NativeBridge {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Optional<MacOsLibrary> getMacOsLibrary() {
|
public static Optional<MacOsLibrary> getMacOsLibrary() {
|
||||||
|
if (!ModuleHelper.isImage() || !AppProperties.get().isFullVersion()) {
|
||||||
|
return Optional.empty();
|
||||||
|
}
|
||||||
|
|
||||||
if (macOsLibrary == null && !loadingFailed) {
|
if (macOsLibrary == null && !loadingFailed) {
|
||||||
try {
|
try {
|
||||||
System.setProperty(
|
System.setProperty(
|
||||||
|
|
Loading…
Reference in a new issue