Skip to content

nicokoch/termsize-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

termsize-rs

Build Status Build status

Documentation

Get the terminal size in columns and rows.

This crate provides a single function, termsize(), which returns the size of the terminal in columns and rows.

Usage

extern crate termsize;
use termsize::termsize;

fn main() {
     match termsize() {
         Some((columns, rows)) => println!("Size of terminal is {} x {}", columns, rows),
         None => println!("Not called from a terminal")
     }
}

About

Get the terminal size in columns and rows

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published