aboutsummaryrefslogtreecommitdiff
path: root/Config.hs
diff options
context:
space:
mode:
authorRaúl Benencia <rul@kalgan.cc>2013-09-05 19:36:33 -0300
committerRaúl Benencia <rul@kalgan.cc>2013-09-05 19:36:33 -0300
commit41b53ca04b6d52457f331930e8fea68416498882 (patch)
treeee63ce86ab4d9a4fc09637a0d5d4015e9f3c9956 /Config.hs
parent84fa12fef1736d04ee79e40cebaadadda262f063 (diff)
New project tree structure
Diffstat (limited to 'Config.hs')
-rw-r--r--Config.hs49
1 files changed, 0 insertions, 49 deletions
diff --git a/Config.hs b/Config.hs
deleted file mode 100644
index 01b1435..0000000
--- a/Config.hs
+++ /dev/null
@@ -1,49 +0,0 @@
-{- Lazymail user configuration
- -
- - Copyright 2013 Raúl Benencia <rul@kalgan.cc>
- -
- - Licensed under the GNU GPL version 3 or higher
- -
- -}
-
-module Config(LazymailConfig(..), defaultConfig, customConfig) where
-
-import Data.List(sort, stripPrefix)
-import System.Posix.Files(getSymbolicLinkStatus, isSymbolicLink)
-import UI.NCurses(Color(..))
-
-import Types(LazymailConfig(..))
-
-defaultConfig = LazymailConfig {
- baseColor = (ColorWhite, ColorBlack)
- , selectionColor = (ColorBlack, ColorWhite)
- , statusBarColor = (ColorBlack, ColorBlue)
- , headerColor = (ColorGreen, ColorBlack)
- , newEmailColor = (ColorBlue, ColorBlack)
- , showStatusBar = True
- , initialPath = ""
- , filterMaildirsHook = \mds -> return mds
- , indexDateFormat = "%m %d"
- , headersToShow = ["date", "from", "to", "cc", "bcc", "subject", "reply-to"]
-}
-
---
--- | 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.
---
---customConfig = defaultConfig { initialPath = "/home/rul/mail/"}
-
-customConfig = defaultConfig { initialPath = "/home/rul/mail/"
- , filterMaildirsHook = filterSymlinks }
-
-filterSymlinks :: [FilePath] -> IO [FilePath]
-filterSymlinks [] = return []
-filterSymlinks (md:mds) = do
- filtered <- do
- fs <- getSymbolicLinkStatus md
- rest <- filterSymlinks mds
- if isSymbolicLink fs
- then return rest
- else return (md:rest)
- return $ sort filtered \ No newline at end of file
nihil fit ex nihilo