From ac2c97301fe9803a220f85098c46166b3f14f510 Mon Sep 17 00:00:00 2001 From: crschnick Date: Thu, 29 Aug 2024 04:23:45 +0000 Subject: [PATCH] Fixes --- app/src/main/java/io/xpipe/app/prefs/SyncCategory.java | 2 +- .../java/io/xpipe/app/terminal/ExternalTerminalType.java | 7 ++++--- app/src/main/java/io/xpipe/app/util/TerminalLauncher.java | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/prefs/SyncCategory.java b/app/src/main/java/io/xpipe/app/prefs/SyncCategory.java index 9c62ecacb..c164942dd 100644 --- a/app/src/main/java/io/xpipe/app/prefs/SyncCategory.java +++ b/app/src/main/java/io/xpipe/app/prefs/SyncCategory.java @@ -42,7 +42,7 @@ public class SyncCategory extends AppPrefsCategory { .addString(prefs.storageGitRemote) .disable(prefs.enableGitStorage.not()) .addComp(terminalTest) - .disable(prefs.storageGitRemote.isNull().and(prefs.enableGitStorage)) + .disable(prefs.storageGitRemote.isNull().or(prefs.enableGitStorage.not())) .addComp(prefs.getCustomComp("gitVaultIdentityStrategy")) .nameAndDescription("openDataDir") .addComp(new ButtonComp(AppI18n.observable("openDataDirButton"), () -> { diff --git a/app/src/main/java/io/xpipe/app/terminal/ExternalTerminalType.java b/app/src/main/java/io/xpipe/app/terminal/ExternalTerminalType.java index 9ada094a3..d136c9829 100644 --- a/app/src/main/java/io/xpipe/app/terminal/ExternalTerminalType.java +++ b/app/src/main/java/io/xpipe/app/terminal/ExternalTerminalType.java @@ -299,7 +299,7 @@ public interface ExternalTerminalType extends PrefsChoiceValue { try (var sc = LocalShell.getShell()) { return switch (OsType.getLocal()) { case OsType.Linux linux -> { - yield Files.exists(Path.of("/opt/termius")); + yield Files.exists(Path.of("/opt/Termius")); } case OsType.MacOs macOs -> { yield Files.exists(Path.of("/Applications/Termius.app")); @@ -1030,12 +1030,13 @@ public interface ExternalTerminalType extends PrefsChoiceValue { XTERM, DEEPIN_TERMINAL, FOOT, - Q_TERMINAL + Q_TERMINAL, + TERMIUS ); List MACOS_TERMINALS = List.of( - KittyTerminalType.KITTY_MACOS, WARP, ITERM2, + KittyTerminalType.KITTY_MACOS, TabbyTerminalType.TABBY_MAC_OS, AlacrittyTerminalType.ALACRITTY_MAC_OS, WezTerminalType.WEZTERM_MAC_OS, diff --git a/app/src/main/java/io/xpipe/app/util/TerminalLauncher.java b/app/src/main/java/io/xpipe/app/util/TerminalLauncher.java index f440a2536..6d6a82fdf 100644 --- a/app/src/main/java/io/xpipe/app/util/TerminalLauncher.java +++ b/app/src/main/java/io/xpipe/app/util/TerminalLauncher.java @@ -23,6 +23,7 @@ public class TerminalLauncher { } openDirect(title, command, type); } + public static void openDirect(String title, FailableFunction command, ExternalTerminalType type) throws Exception { try (var sc = LocalShell.getShell().start()) {