Add custom title to opened terminal windows

This commit is contained in:
crschnick
2023-05-07 23:58:19 +00:00
parent 0845c7e27d
commit 7b36c1a96b
11 changed files with 20 additions and 13 deletions
@@ -17,7 +17,7 @@ public interface ProcessControl extends Closeable, AutoCloseable {
ProcessControl sensitive();
String prepareTerminalOpen() throws Exception;
String prepareTerminalOpen(String displayName) throws Exception;
void closeStdin() throws IOException;
@@ -21,9 +21,9 @@ public interface ShellControl extends ProcessControl {
ShellControl withMessageFormatter(Function<String, String> formatter);
String prepareTerminalOpen() throws Exception;
String prepareTerminalOpen(String displayName) throws Exception;
String prepareIntermediateTerminalOpen(String content) throws Exception;
String prepareIntermediateTerminalOpen(String content, String displayName) throws Exception;
String getTemporaryDirectory() throws Exception;
@@ -28,6 +28,8 @@ public interface ShellDialect {
return null;
}
String changeTitleCommand(String newTitle);
default String applyProfileFilesCommand() {
return null;
}
@@ -5,8 +5,8 @@ import io.xpipe.core.process.CommandControl;
public interface CommandExecutionStore extends DataStore, LaunchableStore {
@Override
default String prepareLaunchCommand() throws Exception {
return create().prepareTerminalOpen();
default String prepareLaunchCommand(String displayName) throws Exception {
return create().prepareTerminalOpen(displayName);
}
CommandControl create() throws Exception;
@@ -2,5 +2,5 @@ package io.xpipe.core.store;
public interface LaunchableStore extends DataStore {
String prepareLaunchCommand() throws Exception;
String prepareLaunchCommand(String displayName) throws Exception;
}
@@ -23,8 +23,8 @@ public interface ShellStore extends DataStore, StatefulDataStore, LaunchableStor
}
@Override
default String prepareLaunchCommand() throws Exception {
return control().prepareTerminalOpen();
default String prepareLaunchCommand(String displayName) throws Exception {
return control().prepareTerminalOpen(displayName);
}
default ShellControl control() {