mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-22 15:40:23 +00:00
Add mac terminals
This commit is contained in:
parent
e73c16892c
commit
e804951763
1 changed files with 36 additions and 34 deletions
|
@ -341,6 +341,40 @@ public interface ExternalTerminalType extends PrefsChoiceValue {
|
|||
|
||||
ExternalTerminalType TABBY_MAC_OS = new TabbyMacOsType();
|
||||
|
||||
ExternalTerminalType ALACRITTY_MACOS = new MacOsType("app.alacrittyMacOs", "Alacritty") {
|
||||
|
||||
@Override
|
||||
public void launch(String name, String file, boolean elevated) throws Exception {
|
||||
try (ShellControl pc = LocalStore.getShell()) {
|
||||
pc.command(String.format(
|
||||
"""
|
||||
%s/Contents/MacOS/alacritty -t "%s" -e %s
|
||||
""",
|
||||
getApplicationPath().orElseThrow(),
|
||||
name,
|
||||
pc.getShellDialect().fileArgument(file)))
|
||||
.execute();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ExternalTerminalType KITTY_MACOS = new MacOsType("app.kittyMacOs", "Kitty") {
|
||||
|
||||
@Override
|
||||
public void launch(String name, String file, boolean elevated) throws Exception {
|
||||
try (ShellControl pc = LocalStore.getShell()) {
|
||||
pc.command(String.format(
|
||||
"""
|
||||
%s/Contents/MacOS/kitty -T "%s" %s
|
||||
""",
|
||||
getApplicationPath().orElseThrow(),
|
||||
name,
|
||||
pc.getShellDialect().fileArgument(file)))
|
||||
.execute();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ExternalTerminalType CUSTOM = new CustomType();
|
||||
|
||||
List<ExternalTerminalType> ALL = Stream.of(
|
||||
|
@ -362,6 +396,8 @@ public interface ExternalTerminalType extends PrefsChoiceValue {
|
|||
TILDA,
|
||||
ITERM2,
|
||||
TABBY_MAC_OS,
|
||||
ALACRITTY_MACOS,
|
||||
KITTY_MACOS,
|
||||
WARP,
|
||||
MACOS_TERMINAL,
|
||||
CUSTOM)
|
||||
|
@ -488,40 +524,6 @@ public interface ExternalTerminalType extends PrefsChoiceValue {
|
|||
}
|
||||
}
|
||||
|
||||
ExternalTerminalType ALACRITTY_MACOS = new MacOsType("app.alacrittyMacOs", "Alacritty") {
|
||||
|
||||
@Override
|
||||
public void launch(String name, String file, boolean elevated) throws Exception {
|
||||
try (ShellControl pc = LocalStore.getShell()) {
|
||||
pc.command(String.format(
|
||||
"""
|
||||
%s/Contents/MacOS/alacritty -t "%s" -e %s
|
||||
""",
|
||||
getApplicationPath().orElseThrow(),
|
||||
name,
|
||||
pc.getShellDialect().fileArgument(file)))
|
||||
.execute();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ExternalTerminalType KITTY_MACOS = new MacOsType("app.kittyMacOs", "Kitty") {
|
||||
|
||||
@Override
|
||||
public void launch(String name, String file, boolean elevated) throws Exception {
|
||||
try (ShellControl pc = LocalStore.getShell()) {
|
||||
pc.command(String.format(
|
||||
"""
|
||||
%s/Contents/MacOS/kitty -T "%s" %s
|
||||
""",
|
||||
getApplicationPath().orElseThrow(),
|
||||
name,
|
||||
pc.getShellDialect().fileArgument(file)))
|
||||
.execute();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class WarpType extends ExternalApplicationType.MacApplication implements ExternalTerminalType {
|
||||
|
||||
public WarpType() {
|
||||
|
|
Loading…
Reference in a new issue