Interface ITerminalOptions
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
PreserveStateAddon,XTerm,XTermBase
Start up options for the terminal.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic enumstatic enumstatic enum -
Method Summary
Modifier and TypeMethodDescriptionvoidsetBellSound(String value) A data uri of the sound to use for the bell when `bellStyle = 'sound'`.voidThe type of the bell notification the terminal will use.voidsetCursorBlink(boolean value) Whether the cursor blinks.voidThe style of the cursor.voidsetCursorWidth(int value) The width of the cursor in CSS pixels when `cursorStyle` is set to 'bar'.voidsetDrawBoldTextInBrightColors(boolean value) Whether to draw bold text in bright colors.voidThe modifier key hold to multiply scroll speed.voidsetFastScrollSensitivity(int number) The scroll speed multiplier used for fast scrolling.voidsetFontFamily(String fontFamily) The font family used to render text.voidsetFontSize(int number) The font size used to render text.voidsetFontWeight(int value) The font weight used to render non-bold text.voidsetFontWeightBold(int value) The font weight used to render bold text.voidsetLetterSpacing(int value) The spacing in whole pixels between characters..voidsetLineHeight(int value) The line height used to render text.voidsetMacOptionClickForcesSelection(boolean value) Whether holding a modifier key will force normal selection behavior, regardless of whether the terminal is in mouse events mode.voidsetMacOptionIsMeta(boolean value) Whether to treat option as the meta key.voidsetMinimumContrastRatio(int value) The minimum contrast ratio for text in the terminal, setting this will change the foreground color dynamically depending on whether the contrast ratio is met.voidThe type of renderer to use, this allows using the fallback DOM renderer when canvas is too slow for the environment.voidsetRightClickSelectsWord(boolean value) Whether to select the word under the cursor on right click, this is standard behavior in a lot of macOS applications.voidsetScreenReaderMode(boolean value) Whether screen reader support is enabled.voidsetScrollback(int value) The amount of scrollback in the terminal.voidsetScrollSensitivity(int value) The scrolling speed multiplier used for adjusting normal scrolling speed.voidsetTabStopWidth(int value) The size of tab stops in the terminal.voidsetTheme(TerminalTheme theme) The color theme of the terminal.voidsetWordSeparator(String value) A string containing all characters that are considered word separated by the double click to select work logic.
-
Method Details
-
setBellSound
A data uri of the sound to use for the bell when `bellStyle = 'sound'`. -
setBellStyle
The type of the bell notification the terminal will use. -
setCursorBlink
void setCursorBlink(boolean value) Whether the cursor blinks. -
setCursorStyle
The style of the cursor. -
setCursorWidth
void setCursorWidth(int value) The width of the cursor in CSS pixels when `cursorStyle` is set to 'bar'. -
setDrawBoldTextInBrightColors
void setDrawBoldTextInBrightColors(boolean value) Whether to draw bold text in bright colors. The default is true. -
setFastScrollModifier
The modifier key hold to multiply scroll speed. -
setFastScrollSensitivity
void setFastScrollSensitivity(int number) The scroll speed multiplier used for fast scrolling. -
setFontSize
void setFontSize(int number) The font size used to render text. -
setFontFamily
The font family used to render text. -
setFontWeight
void setFontWeight(int value) The font weight used to render non-bold text. -
setFontWeightBold
void setFontWeightBold(int value) The font weight used to render bold text. -
setLetterSpacing
void setLetterSpacing(int value) The spacing in whole pixels between characters.. -
setLineHeight
void setLineHeight(int value) The line height used to render text. -
setMacOptionIsMeta
void setMacOptionIsMeta(boolean value) Whether to treat option as the meta key. -
setMacOptionClickForcesSelection
void setMacOptionClickForcesSelection(boolean value) Whether holding a modifier key will force normal selection behavior, regardless of whether the terminal is in mouse events mode. This will also prevent mouse events from being emitted by the terminal. For example, this allows you to use xterm.js' regular selection inside tmux with mouse mode enabled. -
setMinimumContrastRatio
void setMinimumContrastRatio(int value) The minimum contrast ratio for text in the terminal, setting this will change the foreground color dynamically depending on whether the contrast ratio is met. Example values:- 1: The default, do nothing.
- 4.5: Minimum for WCAG AA compliance.
- 7: Minimum for WCAG AAA compliance.
- 21: White on black or black on white.
-
setTheme
The color theme of the terminal. -
setRendererType
The type of renderer to use, this allows using the fallback DOM renderer when canvas is too slow for the environment. The following features do not work when the DOM renderer is used:- Letter spacing - Cursor blink
-
setRightClickSelectsWord
void setRightClickSelectsWord(boolean value) Whether to select the word under the cursor on right click, this is standard behavior in a lot of macOS applications. -
setScreenReaderMode
void setScreenReaderMode(boolean value) Whether screen reader support is enabled. When on this will expose supporting elements in the DOM to support NVDA on Windows and VoiceOver on macOS. -
setScrollback
void setScrollback(int value) The amount of scrollback in the terminal. Scrollback is the amount of rows that are retained when lines are scrolled beyond the initial viewport. -
setScrollSensitivity
void setScrollSensitivity(int value) The scrolling speed multiplier used for adjusting normal scrolling speed. -
setTabStopWidth
void setTabStopWidth(int value) The size of tab stops in the terminal. -
setWordSeparator
A string containing all characters that are considered word separated by the double click to select work logic.
-