module Term::Screen

Extended Modules

Defined in:

screen/version.cr
term-screen.cr

Constant Summary

DEFAULT_SIZE = {27, 80}

Default terminal size

TIOCGWINSZ = 21523
TIOCGWINSZ_PPC = 1074295912
TIOCGWINSZ_SOL = 21608
VERSION = "0.1.0"

Class Method Summary

Instance Method Summary

Class Method Detail

def self.env : Hash(String, String) #

[View source]
def self.env=(env : Hash(String, String)) #

[View source]
def self.output : IO #

[View source]
def self.output=(output : IO) #

[View source]

Instance Method Detail

def cols #

[View source]
def columns #

[View source]
def height #

[View source]
def lines #

[View source]
def rows #

[View source]
def size #

Get terminal dimensions (rows, columns)


[View source]
def size_from_ansicon #

Detect terminal size from Windows ANSICON


[View source]
def size_from_default #

Default terminal size


[View source]
def 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.


[View source]
def size_from_ioctl(file) #

Read terminal size from Unix ioctl


[View source]
def size_from_readline #

Detect screen size using Readline


[View source]
def size_from_stty #

Detect terminal size from stty utility


[View source]
def size_from_tput #

Detect terminal size from tput utility


[View source]
def size_from_win_api #

[View source]
def width #

[View source]