summaryrefslogtreecommitdiffhomepage
path: root/Monitors/Swap.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Monitors/Swap.hs')
-rw-r--r--Monitors/Swap.hs21
1 files changed, 7 insertions, 14 deletions
diff --git a/Monitors/Swap.hs b/Monitors/Swap.hs
index 7a69341..9fb6cc0 100644
--- a/Monitors/Swap.hs
+++ b/Monitors/Swap.hs
@@ -16,22 +16,15 @@ module Monitors.Swap where
import Monitors.Common
-import Data.IORef
import qualified Data.ByteString.Lazy.Char8 as B
swapConfig :: IO MConfig
-swapConfig =
- do lc <- newIORef "#BFBFBF"
- l <- newIORef 30
- nc <- newIORef "#00FF00"
- h <- newIORef 75
- hc <- newIORef "#FF0000"
- t <- newIORef "Swap: <usedratio>%"
- p <- newIORef package
- u <- newIORef ""
- a <- newIORef []
- e <- newIORef ["total", "used", "free", "usedratio"]
- return $ MC nc l lc h hc t p u a e
+swapConfig = newConfig
+ "Swap: <usedratio>" -- template
+ package -- package
+ "" -- usage tail?
+ [] -- added args
+ ["total", "used", "free", "usedratio"] -- available replacements
fileMEM :: IO B.ByteString
fileMEM = B.readFile "/proc/meminfo"
@@ -63,4 +56,4 @@ main :: IO ()
main =
do let af = runSwap []
runMonitor swapConfig af runSwap
--} \ No newline at end of file
+-}