Detailed terminal information ensuring cross-platform compatibility.
Support for Linux, Windows, and macOS.
An intuitive API designed for ease of use, allowing developers to seamlessly integrate terminal settings into their applications with minimal effort.
Efficient and fast, ensuring minimal impact on your systemβs resources.
Highly configurable settings to tailor the terminal behavior to your needs.
Every function is rigorously tested, making the library safe, reliable, and ready for production.
πΉ π Quick Start β A quick guide to get you started with the library.
πΉ π API Reference β Detailed documentation of available functions.
If you have not already added the library to your project, please review the installation guide for more information.
const info = @import("io").terminal.info;
The
info
module provides powerful tools for handling terminal info. Letβs explore some of its features.
_ = try info.get(); // current terminal info.
_ = try info.getHeight(); // current terminal height.
_ = try info.getWidth(); // current terminal width.
_ = try info.getRows(); // current terminal rows.
_ = try info.getCols(); // current terminal cols.
_ = try info.getCursor(); // current terminal cursor.
...
Function | Description |
---|---|
get |
Get current terminal info. |
getCursor |
Get current cursor position. |
getHeight |
Get current terminal height. |
getWidth |
Get current terminal width. |
getRows |
Get current terminal rows. |
getCols |
Get current terminal cols. |
setCursor |
Set the cursor position. |
setCursorAndClear |
Set the cursor position and clears everything after the new position. |
Field | Type | Description | Supported OS |
---|---|---|---|
height |
u16 | The height of the terminal. | All |
width |
u16 | The width of the terminal. | All |
rows |
u16 | The number of rows in the terminal. | All |
cols |
u16 | The number of columns in the terminal. | All |
cursor |
Cursor | The current cursor position. | All |
Field | Type | Description |
---|---|---|
x |
i16 | The x-coordinate of the cursor position. |
y |
i16 | The y-coordinate of the cursor position. |
Comprehensive terminal settings for cross-platform compatibility.
Utility functions for ANSI escape code manipulation and terminal styling.
Seamless Command Line Integration with ZIG.
Robust event handling for terminal key presses and mouse events.
Interactive prompts for user input.