No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Daniel Baumann ef0d36bace
Releasing fastforward version 0.4.4-1~ffwd13+u1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2026-07-20 09:25:42 +02:00
.github Merging upstream version 0.4.4. 2026-07-20 09:24:37 +02:00
debian Releasing fastforward version 0.4.4-1~ffwd13+u1. 2026-07-20 09:25:42 +02:00
examples Adding upstream version 0.4.2. 2026-07-20 09:23:51 +02:00
src Merging upstream version 0.4.4. 2026-07-20 09:24:37 +02:00
.cargo_vcs_info.json Merging upstream version 0.4.4. 2026-07-20 09:24:37 +02:00
.gitignore Adding upstream version 0.4.2. 2026-07-20 09:23:51 +02:00
Cargo.lock Merging upstream version 0.4.4. 2026-07-20 09:24:37 +02:00
Cargo.toml Merging upstream version 0.4.4. 2026-07-20 09:24:37 +02:00
Cargo.toml.orig Merging upstream version 0.4.4. 2026-07-20 09:24:37 +02:00
LICENSE-APACHE Adding upstream version 0.4.2. 2026-07-20 09:23:51 +02:00
LICENSE-MIT Adding upstream version 0.4.2. 2026-07-20 09:23:51 +02:00
README.md Merging upstream version 0.4.4. 2026-07-20 09:24:37 +02:00

terminal-size

Documentation

Rust library for getting the size of your terminal.

Works on Linux, macOS, Windows, and illumos.

use terminal_size::{Width, Height, terminal_size};

let size = terminal_size();
if let Some((Width(w), Height(h))) = size {
    println!("Your terminal is {} cols wide and {} lines tall", w, h);
} else {
    println!("Unable to get terminal size");
}

Minimum Rust Version

This crate requires a minimum Rust version of 1.71.0 (2023-07-13).

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.