Rework custom terminal description and add tilix

This commit is contained in:
crschnick 2024-01-03 14:23:03 +00:00
parent e357c96c5d
commit d8b2c44489
3 changed files with 22 additions and 5 deletions

View file

@ -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);

View file

@ -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,

View file

@ -10,6 +10,8 @@ performanceModeDescription=Disables all visual effects that are not required to
editorProgram=Default Program
editorProgramDescription=The default text editor to use when editing any kind of text data.
windowOpacity=Window opacity
customTerminalPlaceholder=myterminal -e $CMD
customEditorPlaceholder=myeditor $FILE
windowOpacityDescription=Changes the window opacity to keep track of what is happening in the background.
useSystemFont=Use system font
openDataDir=Vault data directory
@ -87,7 +89,7 @@ custom=Custom
passwordManagerCommand=Password manager command
passwordManagerCommandDescription=The command to execute to fetch passwords. The placeholder string $KEY will be replaced by the quoted password key when called. This should call your password manager CLI to print the password to stdout, e.g. mypassmgr get $KEY.\n\nYou can test below whether the output is correct. The command should only output the password itself, no other formatting should be included in the output.
preferEditorTabs=Prefer to open new tabs
preferEditorTabsDescription=Controls whether XPipe will try to open new tabs in your chosen editor instead of new windows.
preferEditorTabsDescription=Controls whether XPipe will try to open new tabs in your chosen editor instead of new windows.\n\nNote that not every editor supports this.
customEditorCommand=Custom editor command
customEditorCommandDescription=The command to execute to open the custom editor. The placeholder string $FILE will be replaced by the quoted absolute file name when called. Remember to quote your editor executable path if it contains spaces.
editorReloadTimeout=Editor reload timeout
@ -131,9 +133,9 @@ terminalProgram=Default program
terminalProgramDescription=The default terminal to use when opening any kind of shell connection. This application is only used for display purposes, the started shell program depends on the shell connection itself.
program=Program
customTerminalCommand=Custom terminal command
customTerminalCommandDescription=The command to execute to open the custom terminal. The placeholder string $CMD will be replaced by the quoted shell script file name when called. Remember to quote your terminal executable path if it contains spaces.
customTerminalCommandDescription=The command to execute to open the custom terminal with a given command. The placeholder string $CMD will be replaced by the actual command when called. Remember to quote your terminal executable path if it contains spaces.
preferTerminalTabs=Prefer to open new tabs
preferTerminalTabsDescription=Controls whether XPipe will try to open new tabs in your chosen terminal instead of new windows.
preferTerminalTabsDescription=Controls whether XPipe will try to open new tabs in your chosen terminal instead of new windows.\n\nNote that not every terminal supports this.
enableFastTerminalStartup=Enable fast terminal startup
enableFastTerminalStartupDescription=When enabled, terminal sessions are attempted to be started quicker when possible.\n\nThis will skip several startup checks and won't update any displayed system information. Any connection errors will only be shown in the terminal.
cmd=cmd.exe
@ -142,3 +144,4 @@ pwsh=Powershell Core
windowsTerminal=Windows Terminal
gnomeTerminal=Gnome Terminal
createLock=Create lock
tilix=Tilix