terminal-size-0.1.0.0: Get terminal window height and width

Safe HaskellNone

System.Console.Terminal.Size

Description

Get terminal window height and width without ncurses dependency

Only tested to work on GNU/Linux systems

Based on answer by Andreas Hammar at http://stackoverflow.com/a/12807521/972985

Synopsis

Documentation

data Window a Source

Terminal window width and height

Constructors

Window 

Fields

height :: !a
 
width :: !a
 

Instances

Functor Window 
Read a => Read (Window a) 
Show a => Show (Window a) 

size :: Integral n => IO (Window n)Source

Get terminal window width and height

>>> import System.Console.Terminal.Size
>>> size
Window {height = 60, width = 112}