{-| Module : Util.ScreenSize Description : Utilities for getting screen width. License : BSD3 Maintainer : The Idris Community. -} module Util.ScreenSize(getScreenWidth) where import System.Console.Terminal.Size (size, width) getScreenWidth :: IO Int getScreenWidth :: IO Int getScreenWidth = forall b a. b -> (a -> b) -> Maybe a -> b maybe Int 80 forall a. Window a -> a width forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b `fmap` forall n. Integral n => IO (Maybe (Window n)) size