diff --git a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java index ed4480e9..ca45226a 100644 --- a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java +++ b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java @@ -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); diff --git a/app/src/main/java/io/xpipe/app/prefs/ExternalTerminalType.java b/app/src/main/java/io/xpipe/app/prefs/ExternalTerminalType.java index c8006166..32995020 100644 --- a/app/src/main/java/io/xpipe/app/prefs/ExternalTerminalType.java +++ b/app/src/main/java/io/xpipe/app/prefs/ExternalTerminalType.java @@ -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, diff --git a/app/src/main/resources/io/xpipe/app/resources/lang/preferences_en.properties b/app/src/main/resources/io/xpipe/app/resources/lang/preferences_en.properties index bdcbbc90..501ff4a0 100644 --- a/app/src/main/resources/io/xpipe/app/resources/lang/preferences_en.properties +++ b/app/src/main/resources/io/xpipe/app/resources/lang/preferences_en.properties @@ -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