Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
getTerminalCapabilitiesFromEnv :: IO TerminalCapabilities Source #
Try to detect how many colours the terminal can handle.
This is based on the colors
capability of the terminfo detected based on the TERM
environment variable.
If the terminal can handle 8-bit colours and also has the COLORTERM
environment variable set to 24bit
or truecolor
, then this function will return With24BitColours
.
getTerminalCapabilitiesFromHandle :: Handle -> IO TerminalCapabilities Source #
Try to detect how many colours a given handle can handle.
This function does the same as getTerminalCapabilitiesFromEnv
but returns WithoutColours
is not a terminal device.