This commit is contained in:
crschnick 2024-08-29 04:23:45 +00:00
parent 2d1e5298a9
commit ac2c97301f
3 changed files with 6 additions and 4 deletions

View file

@ -42,7 +42,7 @@ public class SyncCategory extends AppPrefsCategory {
.addString(prefs.storageGitRemote) .addString(prefs.storageGitRemote)
.disable(prefs.enableGitStorage.not()) .disable(prefs.enableGitStorage.not())
.addComp(terminalTest) .addComp(terminalTest)
.disable(prefs.storageGitRemote.isNull().and(prefs.enableGitStorage)) .disable(prefs.storageGitRemote.isNull().or(prefs.enableGitStorage.not()))
.addComp(prefs.getCustomComp("gitVaultIdentityStrategy")) .addComp(prefs.getCustomComp("gitVaultIdentityStrategy"))
.nameAndDescription("openDataDir") .nameAndDescription("openDataDir")
.addComp(new ButtonComp(AppI18n.observable("openDataDirButton"), () -> { .addComp(new ButtonComp(AppI18n.observable("openDataDirButton"), () -> {

View file

@ -299,7 +299,7 @@ public interface ExternalTerminalType extends PrefsChoiceValue {
try (var sc = LocalShell.getShell()) { try (var sc = LocalShell.getShell()) {
return switch (OsType.getLocal()) { return switch (OsType.getLocal()) {
case OsType.Linux linux -> { case OsType.Linux linux -> {
yield Files.exists(Path.of("/opt/termius")); yield Files.exists(Path.of("/opt/Termius"));
} }
case OsType.MacOs macOs -> { case OsType.MacOs macOs -> {
yield Files.exists(Path.of("/Applications/Termius.app")); yield Files.exists(Path.of("/Applications/Termius.app"));
@ -1030,12 +1030,13 @@ public interface ExternalTerminalType extends PrefsChoiceValue {
XTERM, XTERM,
DEEPIN_TERMINAL, DEEPIN_TERMINAL,
FOOT, FOOT,
Q_TERMINAL Q_TERMINAL,
TERMIUS
); );
List<ExternalTerminalType> MACOS_TERMINALS = List.of( List<ExternalTerminalType> MACOS_TERMINALS = List.of(
KittyTerminalType.KITTY_MACOS,
WARP, WARP,
ITERM2, ITERM2,
KittyTerminalType.KITTY_MACOS,
TabbyTerminalType.TABBY_MAC_OS, TabbyTerminalType.TABBY_MAC_OS,
AlacrittyTerminalType.ALACRITTY_MAC_OS, AlacrittyTerminalType.ALACRITTY_MAC_OS,
WezTerminalType.WEZTERM_MAC_OS, WezTerminalType.WEZTERM_MAC_OS,

View file

@ -23,6 +23,7 @@ public class TerminalLauncher {
} }
openDirect(title, command, type); openDirect(title, command, type);
} }
public static void openDirect(String title, FailableFunction<ShellControl, String, Exception> command, ExternalTerminalType type) public static void openDirect(String title, FailableFunction<ShellControl, String, Exception> command, ExternalTerminalType type)
throws Exception { throws Exception {
try (var sc = LocalShell.getShell().start()) { try (var sc = LocalShell.getShell().start()) {