summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2019-04-21 03:23:41 +0100
committerjao <jao@gnu.org>2019-04-21 03:23:41 +0100
commitecaa26e1f30be13368e202bf01070e0b789d9ecf (patch)
tree44065e57c51a233d980b93b85024313da2e2a3d5 /src/Xmobar
parent435528281c2ae7702324d623668d55b84b38665c (diff)
downloadxmobar-ecaa26e1f30be13368e202bf01070e0b789d9ecf.tar.gz
xmobar-ecaa26e1f30be13368e202bf01070e0b789d9ecf.tar.bz2
Batt: level color set also for AC on/off string
Diffstat (limited to 'src/Xmobar')
-rw-r--r--src/Xmobar/Plugins/Monitors/Batt.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Xmobar/Plugins/Monitors/Batt.hs b/src/Xmobar/Plugins/Monitors/Batt.hs
index 80f4275..9f74835 100644
--- a/src/Xmobar/Plugins/Monitors/Batt.hs
+++ b/src/Xmobar/Plugins/Monitors/Batt.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Plugins.Monitors.Batt
--- Copyright : (c) 2010, 2011, 2012, 2013, 2015, 2016, 2018 Jose A Ortega
+-- Copyright : (c) 2010, 2011, 2012, 2013, 2015, 2016, 2018, 2019 Jose A Ortega
-- (c) 2010 Andrea Rossato, Petr Rockai
-- License : BSD-style (see LICENSE)
--
@@ -209,7 +209,8 @@ runBatt' bfs args = do
do l <- fmtPercent x
ws <- fmtWatts w opts suffix d
si <- getIconPattern opts s x
- parseTemplate (l ++ [fmtStatus opts s nas, fmtTime $ floor t, ws, si])
+ st <- showWithColors' (fmtStatus opts s nas) (100 * x)
+ parseTemplate (l ++ [st, fmtTime $ floor t, ws, si])
NA -> getConfigValue naString
where fmtPercent :: Float -> Monitor [String]
fmtPercent x = do