{-# LANGUAGE OverloadedStrings #-}
module Test.Sandwich.Formatters.TerminalUI.AttrMap where
import Brick
import Brick.Widgets.ProgressBar
import qualified Graphics.Vty as V
import Test.Sandwich.Types.RunTree
import Test.Sandwich.Types.Spec
mainAttrMap :: AttrMap
mainAttrMap :: AttrMap
mainAttrMap = Attr -> [(AttrName, Attr)] -> AttrMap
attrMap Attr
V.defAttr [
(AttrName
visibilityThresholdNotSelectedAttr, Color -> Attr
fg Color
midGray)
, (AttrName
visibilityThresholdSelectedAttr, Color -> Attr
fg Color
solarizedBase2)
, (AttrName
runningAttr, Color -> Attr
fg Color
V.blue)
, (AttrName
pendingAttr, Color -> Attr
fg Color
V.yellow)
, (AttrName
successAttr, Color -> Attr
fg Color
V.green)
, (AttrName
failureAttr, Color -> Attr
fg Color
V.red)
, (AttrName
totalAttr, Color -> Attr
fg Color
solarizedCyan)
, (AttrName
debugAttr, Color -> Attr
fg Color
V.blue), (AttrName
infoAttr, Color -> Attr
fg Color
V.yellow), (AttrName
warnAttr, Color -> Attr
fg Color
V.red), (AttrName
errorAttr, Color -> Attr
fg Color
V.red), (AttrName
otherAttr, Attr
V.defAttr)
, (AttrName
logTimestampAttr, Color -> Attr
fg Color
midGray)
, (AttrName
logFilenameAttr, Color -> Attr
fg Color
solarizedViolet)
, (AttrName
logModuleAttr, Color -> Attr
fg Color
solarizedMagenta)
, (AttrName
logPackageAttr, Color -> Attr
fg Color
solarizedGreen)
, (AttrName
logLineAttr, Color -> Attr
fg Color
solarizedCyan)
, (AttrName
logChAttr, Color -> Attr
fg Color
solarizedOrange)
, (AttrName
logFunctionAttr, Color -> Attr
fg Color
solarizedMagenta)
, (AttrName
progressCompleteAttr, Color -> Attr
bg (Word8 -> Color
V.Color240 Word8
235))
, (AttrName
progressIncompleteAttr, Color -> Attr
bg (Word8 -> Color
V.Color240 Word8
225))
, (AttrName
toggleMarkerAttr, Color -> Attr
fg Color
midGray)
, (AttrName
openMarkerAttr, Color -> Attr
fg Color
midGray)
, (AttrName
visibilityThresholdIndicatorMutedAttr, Color -> Attr
fg (Color -> Attr) -> Color -> Attr
forall a b. (a -> b) -> a -> b
$ Integer -> Color
forall i. Integral i => i -> Color
grayAt Integer
50)
, (AttrName
visibilityThresholdIndicatorAttr, Color -> Attr
fg (Color -> Attr) -> Color -> Attr
forall a b. (a -> b) -> a -> b
$ Integer -> Color
forall i. Integral i => i -> Color
grayAt Integer
150)
, (AttrName
hotkeyAttr, Color -> Attr
fg Color
V.blue)
, (AttrName
disabledHotkeyAttr, Color -> Attr
fg Color
midGray)
, (AttrName
hotkeyMessageAttr, Color -> Attr
fg Color
brightWhite)
, (AttrName
disabledHotkeyMessageAttr, Color -> Attr
fg Color
brightGray)
, (AttrName
expectedAttr, Color -> Attr
fg Color
midWhite)
, (AttrName
sawAttr, Color -> Attr
fg Color
midWhite)
, (AttrName
integerAttr, Color -> Attr
fg Color
solarizedMagenta)
, (AttrName
floatAttr, Color -> Attr
fg Color
solarizedMagenta)
, (AttrName
charAttr, Color -> Attr
fg Color
solarizedCyan)
, (AttrName
stringAttr, Color -> Attr
fg Color
solarizedYellow)
, (AttrName
dateAttr, Color -> Attr
fg Color
solarizedBase2)
, (AttrName
timeAttr, Color -> Attr
fg Color
solarizedBase1)
, (AttrName
quoteAttr, Color -> Attr
fg Color
solarizedBase1)
, (AttrName
slashAttr, Color -> Attr
fg Color
solarizedViolet)
, (AttrName
negAttr, Color -> Attr
fg Color
solarizedViolet)
, (AttrName
listBracketAttr, Color -> Attr
fg Color
solarizedOrange)
, (AttrName
tupleBracketAttr, Color -> Attr
fg Color
solarizedGreen)
, (AttrName
braceAttr, Color -> Attr
fg Color
solarizedGreen)
, (AttrName
ellipsesAttr, Color -> Attr
fg Color
solarizedBase0)
, (AttrName
recordNameAttr, Color -> Attr
fg Color
solarizedRed)
, (AttrName
fieldNameAttr, Color -> Attr
fg Color
solarizedYellow)
, (AttrName
constructorNameAttr, Color -> Attr
fg Color
solarizedViolet)
]
visibilityThresholdNotSelectedAttr :: AttrName
visibilityThresholdNotSelectedAttr :: AttrName
visibilityThresholdNotSelectedAttr = AttrName
"visibility_threshold_not_selected"
visibilityThresholdSelectedAttr :: AttrName
visibilityThresholdSelectedAttr :: AttrName
visibilityThresholdSelectedAttr = AttrName
"visibility_threshold_selected"
runningAttr :: AttrName
runningAttr :: AttrName
runningAttr = AttrName
"running"
notStartedAttr :: AttrName
notStartedAttr :: AttrName
notStartedAttr = AttrName
"not_started"
pendingAttr :: AttrName
pendingAttr :: AttrName
pendingAttr = AttrName
"pending"
totalAttr :: AttrName
totalAttr :: AttrName
totalAttr = AttrName
"total"
successAttr :: AttrName
successAttr :: AttrName
successAttr = AttrName
"success"
failureAttr :: AttrName
failureAttr :: AttrName
failureAttr = AttrName
"failure"
toggleMarkerAttr :: AttrName
toggleMarkerAttr :: AttrName
toggleMarkerAttr = AttrName
"toggleMarker"
openMarkerAttr :: AttrName
openMarkerAttr :: AttrName
openMarkerAttr = AttrName
"openMarker"
visibilityThresholdIndicatorAttr :: AttrName
visibilityThresholdIndicatorAttr :: AttrName
visibilityThresholdIndicatorAttr = AttrName
"visibilityThresholdIndicator"
visibilityThresholdIndicatorMutedAttr :: AttrName
visibilityThresholdIndicatorMutedAttr :: AttrName
visibilityThresholdIndicatorMutedAttr = AttrName
"visibilityThresholdMutedIndicator"
hotkeyAttr, disabledHotkeyAttr, hotkeyMessageAttr, disabledHotkeyMessageAttr :: AttrName
hotkeyAttr :: AttrName
hotkeyAttr = AttrName
"hotkey"
disabledHotkeyAttr :: AttrName
disabledHotkeyAttr = AttrName
"disableHotkey"
hotkeyMessageAttr :: AttrName
hotkeyMessageAttr = AttrName
"hotkeyMessage"
disabledHotkeyMessageAttr :: AttrName
disabledHotkeyMessageAttr = AttrName
"disabledHotkeyMessage"
chooseAttr :: Status -> AttrName
chooseAttr :: Status -> AttrName
chooseAttr Status
NotStarted = AttrName
notStartedAttr
chooseAttr (Running {}) = AttrName
runningAttr
chooseAttr (Done UTCTime
_ UTCTime
_ (Success {})) = AttrName
successAttr
chooseAttr (Done UTCTime
_ UTCTime
_ (Failure (Pending {}))) = AttrName
pendingAttr
chooseAttr (Done UTCTime
_ UTCTime
_ (Failure {})) = AttrName
failureAttr
debugAttr, infoAttr, warnAttr, errorAttr, otherAttr :: AttrName
debugAttr :: AttrName
debugAttr = AttrName
"log_debug"
infoAttr :: AttrName
infoAttr = AttrName
"log_info"
warnAttr :: AttrName
warnAttr = AttrName
"log_warn"
errorAttr :: AttrName
errorAttr = AttrName
"log_error"
otherAttr :: AttrName
otherAttr = AttrName
"log_other"
logTimestampAttr :: AttrName
logTimestampAttr :: AttrName
logTimestampAttr = AttrName
"log_timestamp"
logFilenameAttr, logModuleAttr, logPackageAttr, logLineAttr, logChAttr :: AttrName
logFilenameAttr :: AttrName
logFilenameAttr = AttrName
"logFilename"
logModuleAttr :: AttrName
logModuleAttr = AttrName
"logModule"
logPackageAttr :: AttrName
logPackageAttr = AttrName
"logPackage"
logLineAttr :: AttrName
logLineAttr = AttrName
"logLine"
logChAttr :: AttrName
logChAttr = AttrName
"logCh"
logFunctionAttr :: AttrName
logFunctionAttr = AttrName
"logFunction"
expectedAttr, sawAttr :: AttrName
expectedAttr :: AttrName
expectedAttr = AttrName
"expected"
sawAttr :: AttrName
sawAttr = AttrName
"saw"
integerAttr, timeAttr, dateAttr, stringAttr, charAttr, floatAttr, quoteAttr, slashAttr, negAttr :: AttrName
listBracketAttr, tupleBracketAttr, braceAttr, ellipsesAttr, recordNameAttr, fieldNameAttr, constructorNameAttr :: AttrName
integerAttr :: AttrName
integerAttr = AttrName
"integer"
floatAttr :: AttrName
floatAttr = AttrName
"float"
charAttr :: AttrName
charAttr = AttrName
"char"
stringAttr :: AttrName
stringAttr = AttrName
"string"
dateAttr :: AttrName
dateAttr = AttrName
"date"
timeAttr :: AttrName
timeAttr = AttrName
"time"
quoteAttr :: AttrName
quoteAttr = AttrName
"quote"
slashAttr :: AttrName
slashAttr = AttrName
"slash"
negAttr :: AttrName
negAttr = AttrName
"neg"
listBracketAttr :: AttrName
listBracketAttr = AttrName
"listBracket"
tupleBracketAttr :: AttrName
tupleBracketAttr = AttrName
"tupleBracket"
braceAttr :: AttrName
braceAttr = AttrName
"brace"
ellipsesAttr :: AttrName
ellipsesAttr = AttrName
"ellipses"
recordNameAttr :: AttrName
recordNameAttr = AttrName
"recordName"
fieldNameAttr :: AttrName
fieldNameAttr = AttrName
"fieldName"
constructorNameAttr :: AttrName
constructorNameAttr = AttrName
"fieldName"
solarizedBase03 :: Color
solarizedBase03 = Integer -> Integer -> Integer -> Color
forall i. Integral i => i -> i -> i -> Color
V.rgbColor Integer
0x00 Integer
0x2b Integer
0x36
solarizedBase02 :: Color
solarizedBase02 = Integer -> Integer -> Integer -> Color
forall i. Integral i => i -> i -> i -> Color
V.rgbColor Integer
0x07 Integer
0x36 Integer
0x42
solarizedBase01 :: Color
solarizedBase01 = Integer -> Integer -> Integer -> Color
forall i. Integral i => i -> i -> i -> Color
V.rgbColor Integer
0x58 Integer
0x6e Integer
0x75
solarizedbase00 :: Color
solarizedbase00 = Integer -> Integer -> Integer -> Color
forall i. Integral i => i -> i -> i -> Color
V.rgbColor Integer
0x65 Integer
0x7b Integer
0x83
solarizedBase0 :: Color
solarizedBase0 = Integer -> Integer -> Integer -> Color
forall i. Integral i => i -> i -> i -> Color
V.rgbColor Integer
0x83 Integer
0x94 Integer
0x96
solarizedBase1 :: Color
solarizedBase1 = Integer -> Integer -> Integer -> Color
forall i. Integral i => i -> i -> i -> Color
V.rgbColor Integer
0x93 Integer
0xa1 Integer
0xa1
solarizedBase2 :: Color
solarizedBase2 = Integer -> Integer -> Integer -> Color
forall i. Integral i => i -> i -> i -> Color
V.rgbColor Integer
0xee Integer
0xe8 Integer
0xd5
solarizedBase3 :: Color
solarizedBase3 = Integer -> Integer -> Integer -> Color
forall i. Integral i => i -> i -> i -> Color
V.rgbColor Integer
0xfd Integer
0xf6 Integer
0xe3
solarizedYellow :: Color
solarizedYellow = Integer -> Integer -> Integer -> Color
forall i. Integral i => i -> i -> i -> Color
V.rgbColor Integer
0xb5 Integer
0x89 Integer
0x00
solarizedOrange :: Color
solarizedOrange = Integer -> Integer -> Integer -> Color
forall i. Integral i => i -> i -> i -> Color
V.rgbColor Integer
0xcb Integer
0x4b Integer
0x16
solarizedRed :: Color
solarizedRed = Integer -> Integer -> Integer -> Color
forall i. Integral i => i -> i -> i -> Color
V.rgbColor Integer
0xdc Integer
0x32 Integer
0x2f
solarizedMagenta :: Color
solarizedMagenta = Integer -> Integer -> Integer -> Color
forall i. Integral i => i -> i -> i -> Color
V.rgbColor Integer
0xd3 Integer
0x36 Integer
0x82
solarizedViolet :: Color
solarizedViolet = Integer -> Integer -> Integer -> Color
forall i. Integral i => i -> i -> i -> Color
V.rgbColor Integer
0x6c Integer
0x71 Integer
0xc4
solarizedBlue :: Color
solarizedBlue = Integer -> Integer -> Integer -> Color
forall i. Integral i => i -> i -> i -> Color
V.rgbColor Integer
0x26 Integer
0x8b Integer
0xd2
solarizedCyan :: Color
solarizedCyan = Integer -> Integer -> Integer -> Color
forall i. Integral i => i -> i -> i -> Color
V.rgbColor Integer
0x2a Integer
0xa1 Integer
0x98
solarizedGreen :: Color
solarizedGreen = Integer -> Integer -> Integer -> Color
forall i. Integral i => i -> i -> i -> Color
V.rgbColor Integer
0x85 Integer
0x99 Integer
0x00
midGray :: Color
midGray = Integer -> Color
forall i. Integral i => i -> Color
grayAt Integer
50
brightGray :: Color
brightGray = Integer -> Color
forall i. Integral i => i -> Color
grayAt Integer
80
midWhite :: Color
midWhite = Integer -> Color
forall i. Integral i => i -> Color
grayAt Integer
140
brightWhite :: Color
brightWhite = Integer -> Color
forall i. Integral i => i -> Color
grayAt Integer
200
grayAt :: i -> Color
grayAt i
level = i -> i -> i -> Color
forall i. Integral i => i -> i -> i -> Color
V.rgbColor i
level i
level i
level