Function termsize::get

source ยท
pub fn get() -> Option<Size>
Expand description

Gets the current terminal size

Examples found in repository?
examples/ts.rs (line 2)
1
2
3
4
5
6
pub fn main() {
    match termsize::get() {
        Some(size) => println!("{:?}", size),
        _ => println!("not a term"),
    }
}