Debian Codegraph @

/

debian rust-term-size 0.3.1-2debian librust-term-size-dev debian librust-term-size+debug-dev debian librust-term-size+default-dev debian librust-term-size+nightly-dev debian librust-term-size+unstable-dev debian librust-term-size-0-dev debian librust-term-size-0+debug-dev debian librust-term-size-0+default-dev debian librust-term-size-0+nightly-dev debian librust-term-size-0+unstable-dev debian librust-term-size-0.3-dev debian librust-term-size-0.3+debug-dev debian librust-term-size-0.3+default-dev debian librust-term-size-0.3+nightly-dev debian librust-term-size-0.3+unstable-dev debian librust-term-size-0.3.1-dev debian librust-term-size-0.3.1+debug-dev debian librust-term-size-0.3.1+default-dev debian librust-term-size-0.3.1+nightly-dev
2 more… debian librust-term-size-0.3.1+unstable-dev cargo term_size 0.3.1
debianhtmljsonmakefilemarkdownrustrust-c-abishelltomlyaml 19 files · 88 symbols
View dependency graph

Depends on

README (full)

term_size

Crates.io Crates.io license license Coverage Status Join the chat at https://gitter.im/kbknapp/term_size-rs

Linux: Build Status Windows: Build status

A Rust library to enable getting terminal sizes and dimensions

Documentation

Usage

First, add the following to your Cargo.toml:

[dependencies]
term_size = "0.3"

Next, add this to your crate root:

extern crate term_size;

To get the dimensions of your terminal window, simply use the following:

fn main() {
  if let Some((w, h)) = term_size::dimensions() {
    println!("Width: {}\nHeight: {}", w, h);
  } else {
    println!("Unable to get term size :(")
  }
}

License

Copyright Benjamin Sago, Kevin Knapp, and term_size contributors.

Licensed under either of

  • Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

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.

dir debian/
dir src/
file .clog.toml
file .gitignore
file .travis.yml
file CHANGELOG.md
file CONTRIBUTORS.md
file Cargo.toml
file Cargo.toml.orig
file LICENSE-APACHE
file LICENSE-MIT
file README.md
file appveyor.yml
file index.html
file justfile
file rustfmt.toml