summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Plugins/Monitors.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Plugins/Monitors.hs b/src/Plugins/Monitors.hs
index 8d5ac35..9421170 100644
--- a/src/Plugins/Monitors.hs
+++ b/src/Plugins/Monitors.hs
@@ -3,7 +3,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Xmobar.Plugins.Monitors
--- Copyright : (c) 2010, 2011, 2012 Jose Antonio Ortega Ruiz
+-- Copyright : (c) 2010, 2011, 2012, 2013 Jose Antonio Ortega Ruiz
-- (c) 2007-10 Andrea Rossato
-- License : BSD-style (see LICENSE)
--
@@ -52,7 +52,9 @@ import Plugins.Monitors.Mpris
data Monitors = Weather Station Args Rate
| Network Interface Args Rate
| DynNetwork Args Rate
- | BatteryP [String] Args Rate
+ | BatteryP Args Args Rate
+ | BatteryN Args Args Rate Alias
+ | Battery Args Rate
| DiskU DiskSpec Args Rate
| DiskIO DiskSpec Args Rate
| Thermal Zone Args Rate
@@ -61,7 +63,6 @@ data Monitors = Weather Station Args Rate
| Swap Args Rate
| Cpu Args Rate
| MultiCpu Args Rate
- | Battery Args Rate
| Brightness Args Rate
| CpuFreq Args Rate
| CoreTemp Args Rate
@@ -106,6 +107,7 @@ instance Exec Monitors where
alias (MultiCpu _ _) = "multicpu"
alias (Battery _ _) = "battery"
alias (BatteryP _ _ _)= "battery"
+ alias (BatteryN _ _ _ a)= a
alias (Brightness _ _) = "bright"
alias (CpuFreq _ _) = "cpufreq"
alias (TopProc _ _) = "top"
@@ -142,6 +144,7 @@ instance Exec Monitors where
start (Swap a r) = runM a swapConfig runSwap r
start (Battery a r) = runM a battConfig runBatt r
start (BatteryP s a r) = runM a battConfig (runBatt' s) r
+ start (BatteryN s a r _) = runM a battConfig (runBatt' s) r
start (Brightness a r) = runM a brightConfig runBright r
start (CpuFreq a r) = runM a cpuFreqConfig runCpuFreq r
start (CoreTemp a r) = runM a coreTempConfig runCoreTemp r