summaryrefslogtreecommitdiffhomepage
path: root/Monitors
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@ing.unitn.it>2007-07-11 17:02:01 +0200
committerAndrea Rossato <andrea.rossato@ing.unitn.it>2007-07-11 17:02:01 +0200
commitedb2ea166d227ea7c4bf12b33016ee82ed73543d (patch)
treeecb34033fefad6b3a56287371f423d29e8d63478 /Monitors
parent6db48566e47efcbe8e26f3077712cc08b41701d4 (diff)
downloadxmobar-edb2ea166d227ea7c4bf12b33016ee82ed73543d.tar.gz
xmobar-edb2ea166d227ea7c4bf12b33016ee82ed73543d.tar.bz2
gettin' rid of Krzysztof's object-oriented attitude...;-)
darcs-hash:20070711150201-d6583-1d4d0c9677671416d80e83de9055bdc48c5dd4ed.gz
Diffstat (limited to 'Monitors')
-rw-r--r--Monitors/Batt.hs2
-rw-r--r--Monitors/Common.hs6
-rw-r--r--Monitors/Cpu.hs2
-rw-r--r--Monitors/Mem.hs2
-rw-r--r--Monitors/Net.hs2
-rw-r--r--Monitors/Swap.hs2
-rw-r--r--Monitors/Weather.hs2
7 files changed, 9 insertions, 9 deletions
diff --git a/Monitors/Batt.hs b/Monitors/Batt.hs
index fcc78fd..df288d8 100644
--- a/Monitors/Batt.hs
+++ b/Monitors/Batt.hs
@@ -20,7 +20,7 @@ import System.Posix.Files
import Monitors.Common
battConfig :: IO MConfig
-battConfig = newConfig
+battConfig = mkMConfig
"Batt: <left>" -- template
package -- package
"" -- usage tail?
diff --git a/Monitors/Common.hs b/Monitors/Common.hs
index 390f383..306d46f 100644
--- a/Monitors/Common.hs
+++ b/Monitors/Common.hs
@@ -20,7 +20,7 @@ module Monitors.Common (
, Opts (..)
, setConfigValue
, getConfigValue
- , newConfig
+ , mkMConfig
, runMonitor
, runM
, io
@@ -99,13 +99,13 @@ getConfigValue :: Selector a -> Monitor a
getConfigValue s =
sel s
-newConfig :: String
+mkMConfig :: String
-> String
-> String
-> [OptDescr Opts]
-> [String]
-> IO MConfig
-newConfig tmpl pkg usg args exprts =
+mkMConfig tmpl pkg usg args exprts =
do lc <- newIORef Nothing
l <- newIORef 33
nc <- newIORef Nothing
diff --git a/Monitors/Cpu.hs b/Monitors/Cpu.hs
index d629c14..456add0 100644
--- a/Monitors/Cpu.hs
+++ b/Monitors/Cpu.hs
@@ -18,7 +18,7 @@ import Monitors.Common
import qualified Data.ByteString.Lazy.Char8 as B
cpuConfig :: IO MConfig
-cpuConfig = newConfig
+cpuConfig = mkMConfig
"Cpu: <total>" -- template
package -- package
"" -- usage tail?
diff --git a/Monitors/Mem.hs b/Monitors/Mem.hs
index 4fd6434..b65715d 100644
--- a/Monitors/Mem.hs
+++ b/Monitors/Mem.hs
@@ -17,7 +17,7 @@ module Monitors.Mem where
import Monitors.Common
memConfig :: IO MConfig
-memConfig = newConfig
+memConfig = mkMConfig
"Mem: <usedratio>% (<cache>M)" -- template
package -- package
"" -- usage tail?
diff --git a/Monitors/Net.hs b/Monitors/Net.hs
index 646b15e..1582ee2 100644
--- a/Monitors/Net.hs
+++ b/Monitors/Net.hs
@@ -27,7 +27,7 @@ interval :: Int
interval = 500000
netConfig :: IO MConfig
-netConfig = newConfig
+netConfig = mkMConfig
"<dev>: <rx>|<tx>" -- template
package -- package
"dev" -- usage tail?
diff --git a/Monitors/Swap.hs b/Monitors/Swap.hs
index 6cfdbdd..e83b1e0 100644
--- a/Monitors/Swap.hs
+++ b/Monitors/Swap.hs
@@ -19,7 +19,7 @@ import Monitors.Common
import qualified Data.ByteString.Lazy.Char8 as B
swapConfig :: IO MConfig
-swapConfig = newConfig
+swapConfig = mkMConfig
"Swap: <usedratio>" -- template
package -- package
"" -- usage tail?
diff --git a/Monitors/Weather.hs b/Monitors/Weather.hs
index 885a9e2..8b3172e 100644
--- a/Monitors/Weather.hs
+++ b/Monitors/Weather.hs
@@ -24,7 +24,7 @@ import Text.ParserCombinators.Parsec
weatherConfig :: IO MConfig
-weatherConfig = newConfig
+weatherConfig = mkMConfig
"<station>: <tempC>C, rh <rh>% (<hour>)" -- template
package -- package
"station ID" -- usage tail?