Class PlatformThemeDetector

java.lang.Object
org.aesh.terminal.tty.PlatformThemeDetector

public final class PlatformThemeDetector extends Object
Detects the terminal theme by reading platform-specific configuration files and querying OS settings.

Supports: Windows Terminal, ConEmu/Cmder, macOS dark mode, Alacritty, VSCode, JetBrains IDEs, and Windows legacy console.

Author:
Ståle W. Pedersen
  • Method Details

    • detectPlatformTheme

      public static TerminalTheme detectPlatformTheme(TerminalEnvironment env)
      Detect the terminal theme using platform-specific methods.

      This checks IDE configuration files, OS dark mode settings, and terminal-specific configuration files based on the detected environment.

      Parameters:
      env - the terminal environment
      Returns:
      the detected theme, or UNKNOWN if not detectable
    • getWindowsBuildNumber

      public static int getWindowsBuildNumber()
      Get the Windows build number from the registry.
      Returns:
      the build number, or 0 if not determinable