diff options
author | Jose A Ortega Ruiz <jao@gnu.org> | 2010-02-11 01:38:57 +0100 |
---|---|---|
committer | Jose A Ortega Ruiz <jao@gnu.org> | 2010-02-11 01:38:57 +0100 |
commit | 5d719b4cde41e27c28b8c6342ccc40d97af04370 (patch) | |
tree | 3e85896c249c350025cd8e608a7f7068eb45a5df /Plugins/Monitors.hs | |
parent | 720c9ecadb0302f43769f743b706ffedfbd6b44c (diff) | |
download | xmobar-5d719b4cde41e27c28b8c6342ccc40d97af04370.tar.gz xmobar-5d719b4cde41e27c28b8c6342ccc40d97af04370.tar.bz2 |
First stab at top monitors
Ignore-this: c89a13a99236d416cba2ba285099a2d7
darcs-hash:20100211003857-748be-76b55377cc1c2793711bc4003619dd366af0aa5c.gz
Diffstat (limited to 'Plugins/Monitors.hs')
-rw-r--r-- | Plugins/Monitors.hs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Plugins/Monitors.hs b/Plugins/Monitors.hs index c8d7e83..69ee869 100644 --- a/Plugins/Monitors.hs +++ b/Plugins/Monitors.hs @@ -28,6 +28,7 @@ import Plugins.Monitors.Thermal import Plugins.Monitors.CpuFreq import Plugins.Monitors.CoreTemp import Plugins.Monitors.Disk +import Plugins.Monitors.Top data Monitors = Weather Station Args Rate | Network Interface Args Rate @@ -42,6 +43,8 @@ data Monitors = Weather Station Args Rate | Thermal Zone Args Rate | CpuFreq Args Rate | CoreTemp Args Rate + | TopCpu Args Rate + | TopMem Args Rate deriving (Show,Read,Eq) type Args = [String] @@ -64,6 +67,8 @@ instance Exec Monitors where alias (Battery _ _) = "battery" alias (BatteryP _ _ _)= "battery" alias (CpuFreq _ _) = "cpufreq" + alias (TopCpu _ _) = "top" + alias (TopMem _ _) = "topmem" alias (CoreTemp _ _) = "coretemp" alias (DiskU _ _ _) = "disku" alias (DiskIO _ _ _) = "diskio" @@ -78,5 +83,7 @@ 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 (DiskU s a r) = runM a diskUConfig (runDiskU s) r - start (DiskIO s a r) = runM a diskIOConfig (runDiskIO s) r + start (DiskU s a r) = runM a diskUConfig (runDiskU s) r + start (DiskIO s a r) = runM a diskIOConfig (runDiskIO s) r + start (TopCpu a r) = runM a topCpuConfig runTopCpu r + start (TopMem a r) = runM a topMemConfig runTopMem r |