Rework custom terminal description and add tilix

This commit is contained in:
crschnick committed 2024-01-03 14:23:03 +00:00
1 parent e357c96c5d
commit d8b2c44489
3 files changed
+22 -5

No files matched your search

@@ -147,7 +147,7 @@ public class AppPrefs {
// ===============
private final StringProperty customTerminalCommand = typed(new SimpleStringProperty(""), String.class);
private final StringField customTerminalCommandControl = editable(
StringField.ofStringType(customTerminalCommand).render(() -> new SimpleTextControl()),
StringField.ofStringType(customTerminalCommand).placeholder("customTerminalPlaceholder").render(() -> new SimpleTextControl()),
terminalType.isEqualTo(ExternalTerminalType.CUSTOM));
private final BooleanProperty preferTerminalTabs = typed(new SimpleBooleanProperty(true), Boolean.class);
@@ -208,7 +208,7 @@ public class AppPrefs {
final StringProperty customEditorCommand = typed(new SimpleStringProperty(""), String.class);
private final StringField customEditorCommandControl = editable(
StringField.ofStringType(customEditorCommand).render(() -> new SimpleTextControl()),
StringField.ofStringType(customEditorCommand).placeholder("customEditorPlaceholder").render(() -> new SimpleTextControl()),
externalEditor.isEqualTo(ExternalEditorType.CUSTOM));
private final IntegerProperty editorReloadTimeout = typed(new SimpleIntegerProperty(1000), Integer.class);
@@ -311,6 +311,19 @@ public interface ExternalTerminalType extends PrefsChoiceValue {
}
};
ExternalTerminalType TILIX = new SimplePathType("app.tilix", "tilix") {
@Override
protected CommandBuilder toCommand(String name, String file) {
return CommandBuilder.of().add("-t").addQuoted(name).add("-e").addFile(file);
}
@Override
public boolean isSelectable() {
return OsType.getLocal().equals(OsType.LINUX);
}
};
ExternalTerminalType TERMINATOR = new SimplePathType("app.terminator", "terminator") {
@Override
@@ -535,6 +548,7 @@ public interface ExternalTerminalType extends PrefsChoiceValue {
XFCE,
ELEMENTARY,
GNOME_TERMINAL,
TILIX,
TERMINATOR,
KITTY,
TERMINOLOGY,