diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-06-28 15:24:16 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-06-28 15:24:16 +0200 |
commit | fa59c38ef81d9834f8ffa59d0083eafbcfc44fd7 (patch) | |
tree | 777b29218f9348afc69ca8255d403be0400d98fd /src | |
parent | cc0b1e8d484cf2e73e8807b0d067fa974487c784 (diff) | |
download | xmobar-fa59c38ef81d9834f8ffa59d0083eafbcfc44fd7.tar.gz xmobar-fa59c38ef81d9834f8ffa59d0083eafbcfc44fd7.tar.bz2 |
BatteryN, a named BatteryP
Diffstat (limited to 'src')
-rw-r--r-- | src/Plugins/Monitors.hs | 9 |
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 |