Package org.aesh.readline.util
Class TerminalUtil
java.lang.Object
org.aesh.readline.util.TerminalUtil
Utility class for retrieving terminal size and type information.
- Author:
- Ståle Pedersen
-
Method Summary
Modifier and TypeMethodDescriptionstatic intReturns the height of the terminal in rows.static org.aesh.terminal.tty.SizeReturns the size of the terminal.static StringReturns the type of the terminal (e.g., "xterm", "vt100").static intReturns the width of the terminal in columns.
-
Method Details
-
terminalWidth
public static int terminalWidth()Returns the width of the terminal in columns.- Returns:
- the terminal width, or -1 if the terminal is not available
-
terminalHeight
public static int terminalHeight()Returns the height of the terminal in rows.- Returns:
- the terminal height, or -1 if the terminal is not available
-
terminalSize
public static org.aesh.terminal.tty.Size terminalSize()Returns the size of the terminal.- Returns:
- the terminal size, or a Size with -1 dimensions if the terminal is not available
-
terminalType
Returns the type of the terminal (e.g., "xterm", "vt100").- Returns:
- the terminal type string, or an empty string if the terminal is not available
-