[][src]Module scout::terminal_size

Get the current size of the terminal

NOTE: This is a copy and adaptation of the original mod size from the crate termion.

The original termion::terminal_size function only checks the size against STDOUT, but to interact with the user we use a custom tty (/dev/tty to be precise), so we need to use a different file descriptor.

Constants

TIOCGWINSZ

Functions

terminal_size

Get the size of the terminal for the given file descriptor