summaryrefslogtreecommitdiffstats
path: root/State.hs
blob: a291a53c05f9906fd211c79605474d2d95af2055 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
module State where

import Blessings.String (Blessings)
import qualified Data.Text as T
import Data.Time
import qualified Data.Tree.Zipper as Z
import Scanner
import System.Posix.Signals
import TreeView (TreeView)

data State = State
    { cursor :: Z.TreePos Z.Full TreeView
    , xoffset :: Int
    , yoffset :: Int
    , flashMessage :: Blessings String
    , screenWidth :: Int
    , screenHeight :: Int
    , headBuffer :: [Blessings String]
    , treeBuffer :: [Blessings String]
    , now :: UTCTime
    , signalHandlers :: [(Signal, IO ())]
    , query :: String
    , keymap :: String -> State -> IO State
    , mousemap :: Scan -> State -> IO State
    , tagSymbols :: [(T.Text, T.Text)]
    , colorConfig :: ColorConfig
    }

data ColorConfig = ColorConfig
    { alt :: Blessings String -> Blessings String
    , search :: Blessings String -> Blessings String
    , focus :: Blessings String -> Blessings String
    , quote :: Blessings String -> Blessings String
    , boring :: Blessings String -> Blessings String
    , prefix :: Blessings String -> Blessings String
    , date :: Blessings String -> Blessings String
    , tags :: Blessings String -> Blessings String
    , unreadSearch :: Blessings String -> Blessings String
    , unreadMessage :: Blessings String -> Blessings String
    , boringMessage :: Blessings String -> Blessings String
    , tagMap :: [(T.Text, Blessings String -> Blessings String)]
    }