Enum Device.TerminalType

java.lang.Object
java.lang.Enum<Device.TerminalType>
org.aesh.terminal.Device.TerminalType
All Implemented Interfaces:
Serializable, Comparable<Device.TerminalType>, java.lang.constant.Constable
Enclosing interface:
Device

public static enum Device.TerminalType extends Enum<Device.TerminalType>
Known terminal types and their capabilities.

Each terminal type includes:

  • An identifier string
  • Supported OSC codes
  • Default/native color depth
  • Whether CSI ? 996 n theme DSR queries are supported
  • Enum Constant Details

    • JETBRAINS

      public static final Device.TerminalType JETBRAINS
      JetBrains IDEs (IntelliJ, etc.) using JediTerm
    • VSCODE

      public static final Device.TerminalType VSCODE
      Visual Studio Code integrated terminal
    • APPLE_TERMINAL

      public static final Device.TerminalType APPLE_TERMINAL
      Apple Terminal
    • ITERM2

      public static final Device.TerminalType ITERM2
      iTerm2
    • KITTY

      public static final Device.TerminalType KITTY
      Kitty terminal - GPU-accelerated, uses Kitty graphics protocol. Supports CSI ? 996 n since 0.38.1.
    • GHOSTTY

      public static final Device.TerminalType GHOSTTY
      Ghostty - Fast GPU-accelerated terminal, uses Kitty graphics protocol. Supports CSI ? 996 n since 1.0.0.
    • ALACRITTY

      public static final Device.TerminalType ALACRITTY
      Alacritty - GPU-accelerated terminal
    • WEZTERM

      public static final Device.TerminalType WEZTERM
      WezTerm - GPU-accelerated terminal with multiplexing
    • CONTOUR

      public static final Device.TerminalType CONTOUR
      Contour - Modern terminal emulator. Origin of the CSI ? 996 n extension since 0.4.0.
    • RIO

      public static final Device.TerminalType RIO
      Rio - Hardware-accelerated GPU terminal
    • WARP

      public static final Device.TerminalType WARP
      Warp - Modern terminal with AI features
    • WAVE

      public static final Device.TerminalType WAVE
      Wave - Modern terminal
    • HYPER

      public static final Device.TerminalType HYPER
      Hyper - Electron-based terminal
    • TABBY

      public static final Device.TerminalType TABBY
      Terminus/Tabby - Electron-based terminal
    • EXTRATERM

      public static final Device.TerminalType EXTRATERM
      Extraterm - Electron-based terminal
    • GNOME_TERMINAL

      public static final Device.TerminalType GNOME_TERMINAL
      GNOME Terminal and other VTE-based terminals. Supports CSI ? 996 n since VTE 0.82.0.
    • KONSOLE

      public static final Device.TerminalType KONSOLE
      Konsole - KDE terminal emulator
    • RXVT

      public static final Device.TerminalType RXVT
      rxvt and urxvt
    • WINDOWS_TERMINAL

      public static final Device.TerminalType WINDOWS_TERMINAL
      Windows Terminal
    • MINTTY

      public static final Device.TerminalType MINTTY
      Mintty - Default terminal for Git Bash, Cygwin, MSYS2
    • CONEMU

      public static final Device.TerminalType CONEMU
      ConEmu/Cmder - Windows console emulator
    • TMUX

      public static final Device.TerminalType TMUX
      tmux - Terminal multiplexer. Supports CSI ? 996 n passthrough.
    • SCREEN

      public static final Device.TerminalType SCREEN
      GNU Screen - Terminal multiplexer (no OSC passthrough by default)
    • XTERM

      public static final Device.TerminalType XTERM
      xterm and compatible
    • LINUX_CONSOLE

      public static final Device.TerminalType LINUX_CONSOLE
      Linux console (no OSC query support)
    • UNKNOWN

      public static final Device.TerminalType UNKNOWN
      Unknown terminal - assume basic support
  • Method Details

    • values

      public static Device.TerminalType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Device.TerminalType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getIdentifier

      public String getIdentifier()
    • getSupportedCodes

      public Set<Device.OscCode> getSupportedCodes()
    • supports

      public boolean supports(Device.OscCode code)
    • getDefaultColorDepth

      public ColorDepth getDefaultColorDepth()
      Get the default/native color depth for this terminal type.

      This is the terminal's native capability. The actual color depth may be different depending on TERM/COLORTERM settings.

      Returns:
      the default color depth
    • supportsTrueColor

      public boolean supportsTrueColor()
      Check if this terminal natively supports true color (24-bit).
      Returns:
      true if the terminal supports true color
    • supportsThemeDsr

      public boolean supportsThemeDsr()
      Check if this terminal supports the CSI ? 996 n theme mode DSR query.

      When supported, the terminal can be queried for its current dark/light mode preference using CSI ? 996 n, and responds with CSI ? 997 ; 1 n (dark) or CSI ? 997 ; 2 n (light).

      Additionally, unsolicited notifications can be enabled with CSI ? 2031 h so the terminal reports theme changes automatically.

      Ref: Contour VT extension

      Returns:
      true if CSI ? 996 n theme DSR is supported
    • supportsGraphemeClusterMode

      public boolean supportsGraphemeClusterMode()
      Check if this terminal supports Mode 2027 (grapheme cluster segmentation).

      Mode 2027 tells the terminal to use UAX #29 grapheme cluster segmentation instead of per-codepoint wcwidth for cursor positioning. This is needed for correct handling of multi-codepoint characters like ZWJ emoji sequences, flag emoji, and combining characters.

      Known supporting terminals: Ghostty, WezTerm, Kitty, Contour, Foot.

      Returns:
      true if Mode 2027 is expected to be supported
    • supportsSynchronizedOutput

      public boolean supportsSynchronizedOutput()
      Check if this terminal supports Mode 2026 (synchronized output).

      Synchronized output prevents screen tearing during rapid terminal redraws by buffering rendering until the mode is disabled.

      Known supporting terminals: Kitty, Ghostty, WezTerm, Foot, Contour, iTerm2, Mintty.

      Returns:
      true if Mode 2026 is expected to be supported
    • supportsShellIntegration

      public boolean supportsShellIntegration()
      Check if this terminal supports OSC 133 shell integration.

      OSC 133 marks semantic zones in terminal output (prompt, user input, command output) enabling features like click-to-scroll-to-prompt, command output selection, and visual prompt highlighting.

      Known supporting terminals: iTerm2, Kitty, Ghostty, WezTerm, Foot, Contour, VS Code, Windows Terminal, GNOME Terminal (VTE 0.70+), Konsole (22.04+).

      Returns:
      true if OSC 133 shell integration is expected to be supported
    • supportsHyperlinks

      public boolean supportsHyperlinks()
      Check if this terminal supports OSC 8 hyperlinks.
      Returns:
      true if OSC 8 hyperlinks are supported
    • getExpectedFeatures

      public Set<DeviceAttributes.Feature> getExpectedFeatures()
      Get the expected DA1 features for this terminal type.

      This returns the features that this terminal type is expected to report when queried via DA1. This can be used to validate DA1 responses or to infer capabilities without querying.

      Note: Actual features may vary based on terminal version and configuration.

      Returns:
      set of expected features, never null
    • expectsSixel

      public boolean expectsSixel()
      Check if this terminal type is expected to support Sixel graphics.
      Returns:
      true if Sixel is expected to be supported
    • expectsMouse

      public boolean expectsMouse()
      Check if this terminal type is expected to support mouse input.
      Returns:
      true if mouse support is expected