mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-09-25 09:55:52 +00:00
Warp url fixes
This commit is contained in:
@@ -4,6 +4,8 @@ import io.xpipe.app.prefs.ExternalApplicationType;
|
||||
import io.xpipe.app.process.*;
|
||||
import io.xpipe.app.util.*;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
@@ -82,7 +84,7 @@ public interface WarpTerminalType extends ExternalTerminalType, TrackableTermina
|
||||
.getScriptDialect()
|
||||
.runScriptCommand(
|
||||
sc, configuration.getScriptFile().toString());
|
||||
var script = ScriptHelper.createExecScript(configuration.getScriptDialect(), sc, command);
|
||||
var script = URLEncoder.encode(ScriptHelper.createExecScript(configuration.getScriptDialect(), sc, command).toUnix().toString(), StandardCharsets.UTF_8);
|
||||
if (!configuration.isPreferTabs()) {
|
||||
DesktopHelper.openUrl("warp://action/new_window?path=" + script);
|
||||
} else {
|
||||
|
||||
@@ -10,6 +10,7 @@ import io.xpipe.core.OsType;
|
||||
|
||||
import java.awt.*;
|
||||
import java.net.URI;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
@@ -101,17 +102,6 @@ public class DesktopHelper {
|
||||
});
|
||||
}
|
||||
|
||||
public static void openFileInDefaultApplication(Path file) {
|
||||
if (file == null || !Files.exists(file)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// This can be a blocking operation
|
||||
ThreadHelper.runFailableAsync(() -> {
|
||||
Desktop.getDesktop().open(file.toFile());
|
||||
});
|
||||
}
|
||||
|
||||
public static void browsePathRemote(ShellControl sc, FilePath path, FileKind kind) throws Exception {
|
||||
switch (sc.getOsType()) {
|
||||
case OsType.Windows ignored -> {
|
||||
|
||||
Reference in New Issue
Block a user