hledger-ui-1.32.3: Terminal interface for the hledger accounting system
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hledger.UI.Theme

Description

Synopsis

Documentation

getTheme :: String -> Maybe AttrMap Source #

Look up the named theme, if it exists.

themes :: Map String AttrMap Source #

A selection of named themes specifying terminal colours and styles. One of these is active at a time.

A hledger-ui theme is a vty/brick AttrMap. Each theme specifies a default style (Attr), plus extra styles which are applied when their (hierarchical) name matches the widget rendering context. "More specific styles, if present, are used and only fall back to more general ones when the more specific ones are absent, but also these styles get merged, so that if a more specific style only provides the foreground color, its more general parent style can set the background color, too." For example: rendering a widget named "b" inside a widget named "a", - if a style named "a" <> "b" exists, it will be used. Anything it does not specify will be taken from a style named "a" if that exists, otherwise from the default style. - otherwise if a style named "a" exists, it will be used, and anything it does not specify will be taken from the default style. - otherwise (you guessed it) the default style is used.