Clone this repo:
  1. 882dabd Update TEST_MAPPING by Jeff Vander Stoep · 1 year, 3 months ago main master
  2. 4560ea9 Update TEST_MAPPING am: 3a0b3496f4 am: 2adabfe95b am: 427d445466 am: bce31627fd by Matthew Maurer · 1 year, 11 months ago main-16k-with-phones
  3. bce3162 Update TEST_MAPPING am: 3a0b3496f4 am: 2adabfe95b am: 427d445466 by Matthew Maurer · 1 year, 11 months ago
  4. 427d445 Update TEST_MAPPING am: 3a0b3496f4 am: 2adabfe95b by Matthew Maurer · 1 year, 11 months ago main-16k simpleperf-release
  5. 2adabfe Update TEST_MAPPING am: 3a0b3496f4 by Matthew Maurer · 1 year, 11 months ago

terminal-size

Documention

Rust library to 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.31.0 (2018-12-06)

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.