package terminal_size
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Get the dimensions of the terminal
Install
dune-project
Dependency
Authors
Maintainers
Sources
terminal_size-0.1.1.tbz
sha256=165bb0de1718e2f73fcb46a35ce63f686cd1ecb0ac5f82923dda1fe6e7e9772b
md5=46fe5f36bf485b47b4d88cbdb2cc17f2
doc/README.html
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 optionHow 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.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page