Module scout::terminal_size

source ·
Expand description

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

Functions

  • Get the size of the terminal for the given file descriptor