diff options
Diffstat (limited to 'Monitors')
-rw-r--r-- | Monitors/Batt.hs | 2 | ||||
-rw-r--r-- | Monitors/Common.hs | 6 | ||||
-rw-r--r-- | Monitors/Cpu.hs | 2 | ||||
-rw-r--r-- | Monitors/Mem.hs | 2 | ||||
-rw-r--r-- | Monitors/Net.hs | 2 | ||||
-rw-r--r-- | Monitors/Swap.hs | 2 | ||||
-rw-r--r-- | Monitors/Weather.hs | 2 |
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? |