mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-05-04 03:40:32 +00:00
Rework
This commit is contained in:
@@ -78,13 +78,17 @@ public class ZellijTerminalMultiplexer implements TerminalMultiplexer {
|
||||
@Override
|
||||
public ShellScript launchNewSession(ShellControl control, TerminalLaunchConfiguration config) throws Exception {
|
||||
var configFile = getConfigFile(control);
|
||||
if (control.view().fileExists(configFile)) {
|
||||
var text = control.view().readTextFile(configFile);
|
||||
var s = "// show_startup_tips false";
|
||||
if (text.contains(s)) {
|
||||
var replaced = text.replace(s, "show_startup_tips false");
|
||||
control.view().writeTextFile(configFile, replaced);
|
||||
}
|
||||
|
||||
if (!control.view().fileExists(configFile)) {
|
||||
var def = control.command(CommandBuilder.of().add("zellij", "setup", "--dump-config")).readStdoutOrThrow();
|
||||
control.view().writeTextFile(configFile, def);
|
||||
}
|
||||
|
||||
var text = control.view().readTextFile(configFile);
|
||||
var s = "// show_startup_tips false";
|
||||
if (text.contains(s)) {
|
||||
var replaced = text.replace(s, "show_startup_tips false");
|
||||
control.view().writeTextFile(configFile, replaced);
|
||||
}
|
||||
|
||||
var l = new ArrayList<String>();
|
||||
|
||||
Reference in New Issue
Block a user