zwirn-0.2.3.1: app/zwirnmill/UI/Attributes.hs
module UI.Attributes where
import Brick hiding (on)
import qualified Graphics.Vty as V
attrStatusBar :: AttrName
attrStatusBar = attrName "statusbar"
attrLink :: AttrName
attrLink = attrName "link"
attrCurrentLink :: AttrName
attrCurrentLink = attrName "currentlink"
attrDocStrong :: AttrName
attrDocStrong = attrName "strog"
attrDocEmph :: AttrName
attrDocEmph = attrName "emph"
attrDocCode :: AttrName
attrDocCode = attrName "code"
attrCursor :: AttrName
attrCursor = attrName "cursor"
attrSelected :: AttrName
attrSelected = attrName "selected"
attrCurrentLine :: AttrName
attrCurrentLine = attrName "currentline"
attrFlash :: AttrName
attrFlash = attrName "flash"
attrFlashError :: AttrName
attrFlashError = attrName "flasherror"
attrCurrentLineNum :: AttrName
attrCurrentLineNum = attrName "currentlinenum"
attrLineNum :: AttrName
attrLineNum = attrName "linenum"
attrError :: AttrName
attrError = attrName "error"
syntax :: AttrName
syntax = attrName "syntax"
syntaxText :: AttrName
syntaxText = syntax <> attrName "text"
syntaxNumber :: AttrName
syntaxNumber = syntax <> attrName "number"
syntaxOperator :: AttrName
syntaxOperator = syntax <> attrName "operator"
syntaxSilence :: AttrName
syntaxSilence = syntax <> attrName "silence"
syntaxKeyword :: AttrName
syntaxKeyword = syntax <> attrName "keyword"
attributeMap :: AttrMap
attributeMap =
attrMap
V.defAttr
[ (attrLineNum, V.defAttr),
(attrCurrentLineNum, V.withBackColor V.defAttr V.brightBlack),
(attrStatusBar, bg V.brightBlack),
(attrSelected, bg V.black),
(attrCurrentLine, bg V.brightBlack),
(attrLink, fg V.brightBlue),
(attrCurrentLink, V.withStyle (fg V.brightBlue) V.underline),
(attrDocEmph, V.withStyle (fg V.brightCyan) V.italic),
(attrDocStrong, V.withStyle (fg V.brightMagenta) V.bold),
(attrDocCode, fg V.brightCyan),
(attrFlash, bg V.brightGreen),
(attrFlashError, bg V.brightRed),
(attrError, V.withStyle (fg V.red) V.underline),
(attrSelected <> attrError, V.withBackColor (V.withStyle (fg V.red) V.underline) V.black),
(syntaxText, fg V.brightBlue),
(syntaxNumber, fg V.brightCyan),
(syntaxOperator, fg V.brightMagenta),
(syntaxSilence, fg V.brightCyan),
(syntaxKeyword, fg V.magenta),
(attrSelected <> syntaxText, V.withBackColor (fg V.brightBlue) V.black),
(attrSelected <> syntaxNumber, V.withBackColor (fg V.brightCyan) V.black),
(attrSelected <> syntaxOperator, V.withBackColor (fg V.brightMagenta) V.black),
(attrSelected <> syntaxSilence, V.withBackColor (fg V.brightCyan) V.black),
(attrSelected <> syntaxKeyword, V.withBackColor (fg V.magenta) V.black)
]