Function crossterm::terminal::window_size

source ·
pub fn window_size() -> Result<WindowSize>
Expand description

Returns the terminal size [WindowSize].

The width and height in pixels may not be reliably implemented or default to 0. For unix, https://man7.org/linux/man-pages/man4/tty_ioctl.4.html documents them as “unused”. For windows it is not implemented.