devela::_dep::crossterm::terminal

Function window_size

pub fn window_size() -> Result<WindowSize, Error> 
Available on crate features dep_crossterm and std only.
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.