terminal/ghostty
import { … } from 'zidane-ui/terminal'ui/src/terminal/ghostty.ts
Functions#
loadGhosttyFunction#
The initialised library. A failed load is forgotten, so the next view retries.
function loadGhostty(symbolsFontUrl?: string): Promise<__module>Parameters
| Name | Type | Description |
|---|---|---|
| symbolsFontUrl? | string | Where the app serves the |
Returns
Promise<__module>openTerminalFunction#
term.open(mount) without its focus grab: ghostty-web's open calls focus(), which
focuses the terminal now and again on a timer, so one mounting in the background (the drawer
of a conversation a space switch reopened) took focus from wherever the user was. focus is
a no-op while open runs; the surfaces focus the terminal themselves when asked to
(autoFocus).
function openTerminal(
term: { focus(): void; open(parent: HTMLElement): void },
mount: HTMLElement,
): voidParameters
| Name | Type | Description |
|---|---|---|
| term | { focus(): void; open(parent: HTMLElement): void } | The terminal to open. |
| mount | HTMLElement | The element it renders into. |
Constants#
SYMBOLS_FONTConstant#
Nerd Font symbols (powerline arrows, the git branch glyph prompts print, file icons): the family the app puts last in its terminal font stack, so a Nerd Font the user has installed still wins.
const SYMBOLS_FONT = 'Symbols Nerd Font Mono'