Skip to main content

Module TerminalOption

Module TerminalOption 

Source

Constants§

APC_MAX_BYTES
Set the maximum bytes the APC handler will buffer for all protocols. This prevents malicious input from causing unbounded memory allocation. A NULL value pointer removes all overrides, reverting to the built-in defaults.
APC_MAX_BYTES_KITTY
Set the maximum bytes the APC handler will buffer for Kitty graphics protocol data. A NULL value pointer removes the override, reverting to the built-in default.
BELL
Callback invoked when the terminal receives a BEL character (0x07). Set to NULL to ignore bell events.
COLOR_BACKGROUND
Set the default background color.
COLOR_CURSOR
Set the default cursor color.
COLOR_FOREGROUND
Set the default foreground color.
COLOR_PALETTE
Set the default 256-color palette.
COLOR_SCHEME
Callback invoked in response to a color scheme device status report query (CSI ? 996 n). Return true and fill the out pointer to report the current scheme, or return false to silently ignore. Set to NULL to ignore color scheme queries.
DEFAULT_CURSOR_BLINK
Set whether the default cursor should blink when reset by DECSCUSR (CSI 0 q).
DEFAULT_CURSOR_STYLE
Set the default cursor style used by DECSCUSR reset (CSI 0 q).
DEVICE_ATTRIBUTES
Callback invoked in response to a device attributes query (CSI c, CSI > c, or CSI = c). Return true and fill the out pointer with response data, or return false to silently ignore. Set to NULL to ignore device attributes queries.
ENQUIRY
Callback invoked when the terminal receives an ENQ character (0x05). Set to NULL to send no response.
GLYPH_PROTOCOL
Enable or disable Glyph Protocol APC handling.
KITTY_IMAGE_MEDIUM_FILE
Enable or disable Kitty image loading via the file medium.
KITTY_IMAGE_MEDIUM_SHARED_MEM
Enable or disable Kitty image loading via the shared memory medium.
KITTY_IMAGE_MEDIUM_TEMP_FILE
Enable or disable Kitty image loading via the temporary file medium.
KITTY_IMAGE_STORAGE_LIMIT
Set the Kitty image storage limit in bytes.
MAX_VALUE
Callback invoked when the terminal pwd changes via escape sequences (OSC 7, OSC 9, or OSC 1337 CurrentDir). Set to NULL to ignore pwd change events.
PWD
Set the terminal working directory manually.
PWD_CHANGED
Callback invoked when the terminal pwd changes via escape sequences (OSC 7, OSC 9, or OSC 1337 CurrentDir). Set to NULL to ignore pwd change events.
SELECTION
Set the active screen selection.
SIZE
Callback invoked in response to XTWINOPS size queries (CSI 14/16/18 t). Set to NULL to silently ignore size queries.
TITLE
Set the terminal title manually.
TITLE_CHANGED
Callback invoked when the terminal title changes via escape sequences (e.g. OSC 0 or OSC 2). Set to NULL to ignore title change events.
USERDATA
Opaque userdata pointer passed to all callbacks.
WRITE_PTY
Callback invoked when the terminal needs to write data back to the pty (e.g. in response to a DECRQM query or device status report). Set to NULL to ignore such sequences.
XTVERSION
Callback invoked when the terminal receives an XTVERSION query (CSI > q). Set to NULL to report the default “libghostty” string.

Type Aliases§

Type
Terminal option identifiers.