summaryrefslogtreecommitdiffstats
path: root/src/Much/Config.hs
blob: 53c2891556340967ec122478b41fa575277ecb44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{-# LANGUAGE DeriveGeneric #-}
module Much.Config where

import GHC.Generics (Generic)
import GHC.Word (Word8)
import Data.Aeson (FromJSON)
import Much.State (ColorConfig)
import qualified Data.Text as T
import qualified Data.Map as M

data Config = Config
  { colorConfig :: Maybe (ColorConfig (Maybe [Word8]))
  , query :: Maybe String
  , tagSymbols :: Maybe (M.Map T.Text T.Text)
  , attachmentOverwrite :: Maybe Bool
  , attachmentDirectory :: Maybe FilePath
  } deriving (Generic, Show)

instance FromJSON Config