module

Term::Screen

Constants

DEFAULT_SIZE = {27, 80}

Default terminal size

VERSION = "1.0.0"

Class methods

env=(env : Hash(String, String))
Source
output
Source
output=(output : IO)
Source

Instance methods

cols
Source
columns
Source
height
Source
lines
Source
rows
Source
size

Get terminal dimensions (rows, columns)

Source
size_from_ansicon

Detect terminal size from Windows ANSICON

Source
size_from_default

Default terminal size

Source
size_from_env

Detect terminal size from environment

After executing Crystal code if the user changes terminal dimensions during code runtime, the code won't be notified, and hence won't see the new dimensions reflected in its copy of LINES and COLUMNS environment variables.

Source
size_from_ioctl(file)

Read terminal size from Unix ioctl

Source
size_from_readline

Detect screen size using Readline

Source
size_from_stty

Detect terminal size from stty utility

Source
size_from_tput

Detect terminal size from tput utility

Source
size_from_win_api
Source
width
Source