aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2015-03-29 17:49:38 +0900
committerSean Whitton <spwhitton@spwhitton.name>2015-03-29 17:49:38 +0900
commitd3763e664f385059940ec6da1fb9f823a7cf6048 (patch)
tree34296cc74616cdb06bb9464e8afb5931147e51b8
parent55d150f84f3cc9d834c2c9aca3f377c35de8d626 (diff)
downloadsrem-d3763e664f385059940ec6da1fb9f823a7cf6048.tar.gz
config function to get cache directory location
-rw-r--r--src/Control/SremConfig.hs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Control/SremConfig.hs b/src/Control/SremConfig.hs
index ef62cbe..eea067b 100644
--- a/src/Control/SremConfig.hs
+++ b/src/Control/SremConfig.hs
@@ -1,4 +1,13 @@
-module Control.SremConfig where
+module Control.SremConfig ( getCacheDirectory
+ , intervals
+ ) where
+
+import System.Directory (getHomeDirectory)
+import System.FilePath ((</>))
+
+getCacheDirectory :: IO FilePath
+getCacheDirectory = getHomeDirectory >>= \h ->
+ return $ h </> ".cache" </> "srem"
intervals :: [Int]
intervals = [60, 15, 0]