Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions app/src/lib/shells/linux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export enum Shell {
LXTerminal = 'LXDE Terminal',
Warp = 'Warp',
BlackBox = 'Black Box',
Ptyxis = 'Ptyxis',
}

export const Default = Shell.Gnome
Expand Down Expand Up @@ -76,6 +77,8 @@ function getShellPath(shell: Shell): Promise<string | null> {
return getPathIfAvailable('/usr/bin/warp-terminal')
case Shell.BlackBox:
return getPathIfAvailable('/usr/bin/blackbox-terminal')
case Shell.Ptyxis:
return getPathIfAvailable('/usr/bin/ptyxis')
default:
return assertNever(shell, `Unknown shell: ${shell}`)
}
Expand All @@ -102,6 +105,7 @@ export async function getAvailableShells(): Promise<
lxterminalPath,
warpPath,
blackBoxPath,
ptyxisPath,
] = await Promise.all([
getShellPath(Shell.Gnome),
getShellPath(Shell.GnomeConsole),
Expand All @@ -120,6 +124,7 @@ export async function getAvailableShells(): Promise<
getShellPath(Shell.LXTerminal),
getShellPath(Shell.Warp),
getShellPath(Shell.BlackBox),
getShellPath(Shell.Ptyxis),
])

const shells: Array<FoundShell<Shell>> = []
Expand Down Expand Up @@ -191,6 +196,10 @@ export async function getAvailableShells(): Promise<
shells.push({ shell: Shell.BlackBox, path: blackBoxPath })
}

if (ptyxisPath) {
shells.push({ shell: Shell.Ptyxis, path: ptyxisPath })
}

return shells
}

Expand Down Expand Up @@ -227,6 +236,11 @@ export function launch(
return spawn(foundShell.path, ['--working-directory=' + path])
case Shell.Warp:
return spawn(foundShell.path, [], { cwd: path })
case Shell.Ptyxis:
return spawn(foundShell.path, [
'--new-window',
'--working-directory=' + path,
])
default:
return assertNever(shell, `Unknown shell: ${shell}`)
}
Expand Down
2 changes: 2 additions & 0 deletions docs/technical/shell-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ These shells are currently supported:
- [XTerm](http://invisible-island.net/xterm/)
- [Terminology](https://www.enlightenment.org/docs/apps/terminology.md)
- [Black Box](https://gitlab.gnome.org/raggesilver/blackbox)
- [Ptyxis](https://gitlab.gnome.org/chergert/ptyxis)

These are defined in an enum at the top of the file:

Expand All @@ -256,6 +257,7 @@ export enum Shell {
Xterm = 'XTerm',
Terminology = 'Terminology',
BlackBox = 'Black Box',
Ptyxis = 'Ptyxis',
}
```

Expand Down