Interface ITerminalOptions

All Superinterfaces:
Serializable
All Known Implementing Classes:
PreserveStateAddon, XTerm, XTermBase

public interface ITerminalOptions extends Serializable
Start up options for the terminal.
  • Method Details

    • setBellSound

      void setBellSound(String value)
      A data uri of the sound to use for the bell when `bellStyle = 'sound'`.
    • setBellStyle

      void setBellStyle(ITerminalOptions.BellStyle value)
      The type of the bell notification the terminal will use.
    • setCursorBlink

      void setCursorBlink(boolean value)
      Whether the cursor blinks.
    • setCursorStyle

      void setCursorStyle(ITerminalOptions.CursorStyle value)
      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

      void setFastScrollModifier(ITerminalOptions.FastScrollModifier value)
      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

      void setFontFamily(String fontFamily)
      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

      void setTheme(TerminalTheme theme)
      The color theme of the terminal.
    • setRendererType

      void setRendererType(ITerminalOptions.RendererType value)
      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

      void setWordSeparator(String value)
      A string containing all characters that are considered word separated by the double click to select work logic.