Registry / utility / terminal-size

terminal-size

JSON →
library0.4.4rscratesunverified

Gets the size of your Linux or Windows terminal in columns and rows.

# Cargo.toml [dependencies] terminal_size = "0.4.4"
INSTALL
IMPORT
SIG · TERMINAL-SIZE
T
terminal-size
utilityrustv0.4.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

terminal_size
use terminal_size::terminal_size;

Retrieves and prints the terminal dimensions.

use terminal_size::terminal_size; fn main() { if let Some((width, height)) = terminal_size() { println!("Terminal size: {}x{}", width.0, height.0); } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.4.4latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
terminal-size — cargo add terminal-size · libregistry