package terminal_size

  1. Overview
  2. Docs
Get the dimensions of the terminal

Install

Dune Dependency

Authors

Maintainers

Sources

terminal_size-0.1.0.tbz
sha256=b58e22054f3269d28fd270ff167497a2d14eec6077646ae14e6b055388cd2852
md5=1ae2f8533917b21d986a2a34846c4df1

Description

You can use this small library to detect the dimensions of the terminal window attached to a process.

Published: 09 Sep 2016

README

README.md

Terminal_size

What is it?

You can use this small ocaml library to detect the dimensions of the terminal window attached to a process. It contains the two following functions:

val get_rows : unit -> int option
val get_columns : unit -> int option

How does it work?

Usually, to get this information, one would open a pipe from tput cols or stty size and parsing the output. Instead, this uses the ioctl that these commands use, TIOCGWINSZ.

Dependencies (4)

  1. topkg build
  2. ocamlfind build
  3. ocamlbuild build
  4. ocaml >= "4.01.0"

Dev Dependencies

None

Used by (1)

  1. progress < "0.2.0"

Conflicts

None

OCaml

Innovation. Community. Security.