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 a28ed70c..51afd1b9 100644 --- a/app/src/main/java/io/xpipe/app/prefs/ExternalTerminalType.java +++ b/app/src/main/java/io/xpipe/app/prefs/ExternalTerminalType.java @@ -30,7 +30,21 @@ public interface ExternalTerminalType extends PrefsChoiceValue { }; public static final ExternalTerminalType POWERSHELL = - new SimpleType("powershell", "powershell.exe", "PowerShell") { + new SimpleType("powershell", "powershell", "PowerShell") { + + @Override + protected String toCommand(String name, String file) { + return "-ExecutionPolicy Bypass -Command cmd /C '" + file + "'"; + } + + @Override + public boolean isSelectable() { + return OsType.getLocal().equals(OsType.WINDOWS); + } + }; + + public static final ExternalTerminalType PWSH = + new SimpleType("pwsh", "pwsh", "PowerShell Core") { @Override protected String toCommand(String name, String file) { @@ -125,6 +139,7 @@ public interface ExternalTerminalType extends PrefsChoiceValue { public static final List ALL = Stream.of( WINDOWS_TERMINAL, + PWSH, POWERSHELL, CMD, KONSOLE, 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 5996dcf4..541ee829 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 @@ -90,5 +90,6 @@ customTerminalCommand=Custom terminal command customTerminalCommandDescription=The command to use to open the custom terminal. The placeholder string $cmd will be replaced by the actual command when called. If you don't specify a placeholder command, the actual command will be appended. cmd=cmd.exe powershell=Powershell +pwsh=Powershell Core windowsTerminal=Windows Terminal gnomeTerminal=Gnome Terminal \ No newline at end of file diff --git a/dist/build.gradle b/dist/build.gradle index b59eed32..e4f1585f 100644 --- a/dist/build.gradle +++ b/dist/build.gradle @@ -42,6 +42,7 @@ if (rootProject.fullVersion) { apply from: 'proguard.gradle' apply from: 'jreleaser.gradle' apply from: 'choco.gradle' + apply from: 'homebrew.gradle' if (org.gradle.internal.os.OperatingSystem.current().isLinux()) { apply from: 'linux_packages.gradle'