From ecaa26e1f30be13368e202bf01070e0b789d9ecf Mon Sep 17 00:00:00 2001 From: jao Date: Sun, 21 Apr 2019 03:23:41 +0100 Subject: Batt: level color set also for AC on/off string --- src/Xmobar/Plugins/Monitors/Batt.hs | 5 +++-- 1 file 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 -- cgit v1.2.3