MystPi / term_size

πŸ“ Retrieve the terminal's size in rows and columns in Gleam.

Home Page:https://hexdocs.pm/term_size

Repository from Github https://github.comMystPi/term_sizeRepository from Github https://github.comMystPi/term_size

term_size

Retrieve the terminal's size in rows and columns.

Package Version Hex Docs

✨ This package works on all targets!

gleam add term_size
import gleam/io
import gleam/string
import term_size

pub fn main() {
  let assert Ok(columns) = term_size.columns()

  string.repeat("-", columns)
  |> io.println
}

Further documentation can be found at https://hexdocs.pm/term_size.

Development

gleam run   # Run the project
gleam test  # Run the tests
gleam shell # Run an Erlang shell

About

πŸ“ Retrieve the terminal's size in rows and columns in Gleam.

https://hexdocs.pm/term_size

License:Apache License 2.0


Languages

Language:Gleam 60.3%Language:JavaScript 28.4%Language:Erlang 11.3%