Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mystpi/term_size
📏 Retrieve the terminal's size in rows and columns in Gleam.
https://github.com/mystpi/term_size
erlang gleam javascript size terminal
Last synced: about 1 month ago
JSON representation
📏 Retrieve the terminal's size in rows and columns in Gleam.
- Host: GitHub
- URL: https://github.com/mystpi/term_size
- Owner: MystPi
- License: apache-2.0
- Created: 2024-04-12T20:17:34.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-04-13T11:58:40.000Z (7 months ago)
- Last Synced: 2024-04-14T17:11:39.508Z (7 months ago)
- Topics: erlang, gleam, javascript, size, terminal
- Language: Gleam
- Homepage: https://hexdocs.pm/term_size
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# term_size
Retrieve the terminal's size in rows and columns.
[![Package Version](https://img.shields.io/hexpm/v/term_size)](https://hex.pm/packages/term_size)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/term_size/)✨ This package works on all targets!
```sh
gleam add term_size
``````gleam
import gleam/io
import gleam/string
import term_sizepub fn main() {
let assert Ok(columns) = term_size.columns()string.repeat("-", columns)
|> io.println
}
```Further documentation can be found at .
## Development
```sh
gleam run # Run the project
gleam test # Run the tests
gleam shell # Run an Erlang shell
```