From f8a4858bc0d566b20c8201a6c42decd81442c41a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Benencia?= Date: Sat, 24 Aug 2013 12:06:36 -0300 Subject: Towards State monad --- Config.hs | 47 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 14 deletions(-) (limited to 'Config.hs') diff --git a/Config.hs b/Config.hs index b2d865b..39e227f 100644 --- a/Config.hs +++ b/Config.hs @@ -1,16 +1,35 @@ --- This module is part of Lazymail, a Haskell email client. +{- Lazymail user configuration + - + - Copyright 2013 Raúl Benencia + - + - Licensed under the GNU GPL version 3 or higher + - + -} + +module Config(LazymailConfig(..), defaultConfig, customConfig) where + +import UI.NCurses(Color(..)) +import System.FilePath(FilePath) + +data LazymailConfig = LazymailConfig { + baseColor :: (Color, Color) -- (foreground, background) + , selectionColor :: (Color, Color) + , statusBarColor :: (Color, Color) + , showStatusBar :: Bool + , basePath :: Maybe FilePath +} + +defaultConfig = LazymailConfig { + baseColor = (ColorWhite, ColorBlack) + , selectionColor = (ColorBlack, ColorWhite) + , statusBarColor = (ColorBlack, ColorWhite) + , showStatusBar = True + , basePath = Nothing +} + -- --- Copyright (C) 2013 Raúl Benencia +-- | Users should modify customConfig in order to set-up their +-- preferences. In a possible future maybe I'll work in a not-so-crappy +-- config system. -- --- This program is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +customConfig = defaultConfig { basePath = "/home/rul/mail/kalgan" } \ No newline at end of file -- cgit v1.2.3