summaryrefslogtreecommitdiffhomepage
path: root/Plugins/Monitors.hs
diff options
context:
space:
mode:
authorJose A Ortega Ruiz <jao@gnu.org>2010-01-25 03:31:12 +0100
committerJose A Ortega Ruiz <jao@gnu.org>2010-01-25 03:31:12 +0100
commit3f733d1ad19501eadf1b97757bee16ab51150632 (patch)
tree00519699a42d6fc64aa49bb48d702a62643d8bf8 /Plugins/Monitors.hs
parentbeb44d60db84430915c1a10e0ac8d4d714dd3cef (diff)
downloadxmobar-3f733d1ad19501eadf1b97757bee16ab51150632.tar.gz
xmobar-3f733d1ad19501eadf1b97757bee16ab51150632.tar.bz2
New disk i/o monitor
Ignore-this: f12c861c05fbaa80271f577dee952c69 darcs-hash:20100125023112-748be-7222c7e7371ef2fab07ef3fe2fe60b48a4f735f4.gz
Diffstat (limited to 'Plugins/Monitors.hs')
-rw-r--r--Plugins/Monitors.hs27
1 files changed, 16 insertions, 11 deletions
diff --git a/Plugins/Monitors.hs b/Plugins/Monitors.hs
index 72e0d50..4943b69 100644
--- a/Plugins/Monitors.hs
+++ b/Plugins/Monitors.hs
@@ -27,18 +27,20 @@ import Plugins.Monitors.Batt
import Plugins.Monitors.Thermal
import Plugins.Monitors.CpuFreq
import Plugins.Monitors.CoreTemp
+import Plugins.Monitors.Disk
-data Monitors = Weather Station Args Rate
- | Network Interface Args Rate
- | Memory Args Rate
- | Swap Args Rate
- | Cpu Args Rate
- | MultiCpu Args Rate
- | Battery Args Rate
- | BatteryP [String] Args Rate
- | Thermal Zone Args Rate
- | CpuFreq Args Rate
- | CoreTemp Args Rate
+data Monitors = Weather Station Args Rate
+ | Network Interface Args Rate
+ | Memory Args Rate
+ | Swap Args Rate
+ | Cpu Args Rate
+ | MultiCpu Args Rate
+ | Battery Args Rate
+ | BatteryP [String] Args Rate
+ | Disk DiskSpec Args Rate
+ | Thermal Zone Args Rate
+ | CpuFreq Args Rate
+ | CoreTemp Args Rate
deriving (Show,Read,Eq)
type Args = [String]
@@ -48,6 +50,7 @@ type Station = String
type Zone = String
type Interface = String
type Rate = Int
+type DiskSpec = [(String, String)]
instance Exec Monitors where
alias (Weather s _ _) = s
@@ -61,6 +64,7 @@ instance Exec Monitors where
alias (BatteryP _ _ _)= "battery"
alias (CpuFreq _ _) = "cpufreq"
alias (CoreTemp _ _) = "coretemp"
+ alias (Disk _ _ _) = "disk"
start (Weather s a r) = runM (a ++ [s]) weatherConfig runWeather r
start (Network i a r) = runM (a ++ [i]) netConfig runNet r
start (Thermal z a r) = runM (a ++ [z]) thermalConfig runThermal r
@@ -72,3 +76,4 @@ instance Exec Monitors where
start (BatteryP s a r) = runM a battConfig (runBatt' s) r
start (CpuFreq a r) = runM a cpuFreqConfig runCpuFreq r
start (CoreTemp a r) = runM a coreTempConfig runCoreTemp r
+ start (Disk s a r) = runM a diskConfig (runDisk s) r