Package org.aesh.terminal.tty
Class PlatformThemeDetector
java.lang.Object
org.aesh.terminal.tty.PlatformThemeDetector
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 Summary
Modifier and TypeMethodDescriptionstatic TerminalThemeDetect the terminal theme using platform-specific methods.static intGet the Windows build number from the registry.
-
Method Details
-
detectPlatformTheme
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
-