vty-unix-0.2.0.0: Unix backend for Vty

Safe Haskell | None
Language | Haskell2010

Graphics.Vty.Platform.Unix.Output

Description

This module provides a function to build an `Output` for Unix terminal devices.

This module is exposed for testing purposes only; applications should never need to import this directly.

Synopsis

- buildOutput :: VtyUserConfig -> UnixSettings -> IO Output

# Documentation

buildOutput :: VtyUserConfig -> UnixSettings -> IO Output Source #

Returns an `Output` for the terminal specified in `UnixSettings`.

The specific output implementation chosen is based on the `TERM` environment variable and ultimately uses `Graphics.Vty.Platform.Unix.Output.XTermColor` for terminals that look `xterm`-like or `Graphics.Vty.Platform.Unix.Output.TerminfoBased` as a fallback otherwise.

- If `TERM` starts with `xterm`, `screen`, `rxvt`, or `tmux`, this will the `xterm`-based implementation.
- Otherwise this will use the `TerminfoBased` implementation.