summaryrefslogtreecommitdiffhomepage
path: root/Plugins/Monitors.hs
diff options
context:
space:
mode:
authorJuraj Hercek <juhe_haskell@hck.sk>2007-11-30 21:54:30 +0100
committerJuraj Hercek <juhe_haskell@hck.sk>2007-11-30 21:54:30 +0100
commitbd99e674006d5262501243aadfafeff841633e6e (patch)
tree4c4a30e2c2e9aa8434c12d12a170f7128e87555f /Plugins/Monitors.hs
parent5ebd0d511eb90060230baa7fd46b668a32417be7 (diff)
downloadxmobar-bd99e674006d5262501243aadfafeff841633e6e.tar.gz
xmobar-bd99e674006d5262501243aadfafeff841633e6e.tar.bz2
Added thermal, cpufreq and coretemp monitors.
Prerequisities: thermal - thermal module should be loaded/compiled in kernel - available in (at least) intel centrino processors cpufreq - acpi_cpufreq module should be loaded/compiled in kernel - available in modern processors coretemp - coretemp module should be loaded/compiled in kernel - available (at least) in core 2 duo processors darcs-hash:20071130205430-f49a6-0ff042af60c91416fd8dd8190cbd9022bcabb269.gz
Diffstat (limited to 'Plugins/Monitors.hs')
-rw-r--r--Plugins/Monitors.hs24
1 files changed, 18 insertions, 6 deletions
diff --git a/Plugins/Monitors.hs b/Plugins/Monitors.hs
index 1321e38..553862b 100644
--- a/Plugins/Monitors.hs
+++ b/Plugins/Monitors.hs
@@ -23,6 +23,9 @@ import Plugins.Monitors.Mem
import Plugins.Monitors.Swap
import Plugins.Monitors.Cpu
import Plugins.Monitors.Batt
+import Plugins.Monitors.Thermal
+import Plugins.Monitors.CpuFreq
+import Plugins.Monitors.CoreTemp
data Monitors = Weather Station Args Rate
| Network Interface Args Rate
@@ -30,6 +33,9 @@ data Monitors = Weather Station Args Rate
| Swap Args Rate
| Cpu Args Rate
| Battery Args Rate
+ | Thermal Args Rate
+ | CpuFreq Args Rate
+ | CoreTemp Args Rate
deriving (Show,Read,Eq)
type Args = [String]
@@ -46,9 +52,15 @@ instance Exec Monitors where
alias (Swap _ _) = "swap"
alias (Cpu _ _) = "cpu"
alias (Battery _ _) = "battery"
- start (Weather s a r) = runM (a ++ [s]) weatherConfig runWeather r
- start (Network i a r) = runM (a ++ [i]) netConfig runNet r
- start (Memory a r) = runM a memConfig runMem r
- start (Swap a r) = runM a swapConfig runSwap r
- start (Cpu a r) = runM a cpuConfig runCpu r
- start (Battery a r) = runM a battConfig runBatt r
+ alias (Thermal _ _) = "thermal"
+ alias (CpuFreq _ _) = "cpufreq"
+ alias (CoreTemp _ _) = "coretemp"
+ start (Weather s a r) = runM (a ++ [s]) weatherConfig runWeather r
+ start (Network i a r) = runM (a ++ [i]) netConfig runNet r
+ start (Memory a r) = runM a memConfig runMem r
+ start (Swap a r) = runM a swapConfig runSwap r
+ start (Cpu a r) = runM a cpuConfig runCpu r
+ start (Battery a r) = runM a battConfig runBatt r
+ start (Thermal a r) = runM a thermalConfig runThermal r
+ start (CpuFreq a r) = runM a cpuFreqConfig runCpuFreq r
+ start (CoreTemp a r) = runM a coreTempConfig runCoreTemp r