summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2016-08-12 00:27:33 +0200
committerjao <jao@gnu.org>2016-08-12 00:27:33 +0200
commitb06e8cc8b451e4bd62af0901241a136abedc0c7e (patch)
treed71af6efbc0dd4d41e0a26a8d7d3a95b8056da27 /src/Plugins/Monitors
parent90cc2c33676efa0fb0936ec63868cf6168889f3e (diff)
downloadxmobar-b06e8cc8b451e4bd62af0901241a136abedc0c7e.tar.gz
xmobar-b06e8cc8b451e4bd62af0901241a136abedc0c7e.tar.bz2
Battery monitor: yet another stab at #271
Diffstat (limited to 'src/Plugins/Monitors')
-rw-r--r--src/Plugins/Monitors/Batt.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Plugins/Monitors/Batt.hs b/src/Plugins/Monitors/Batt.hs
index 5dc305f..0469ac2 100644
--- a/src/Plugins/Monitors/Batt.hs
+++ b/src/Plugins/Monitors/Batt.hs
@@ -188,9 +188,9 @@ readBatteries opts bfs =
(sort (map status bats))
acst = mostCommonDef Unknown $ filter (Unknown/=) statuses
racst | acst /= Unknown = acst
- | not ac = Discharging
- | left == 0 = Full
- | otherwise = Charging
+ | time == 0 = Idle
+ | ac = Charging
+ | otherwise = Discharging
return $ if isNaN left then NA else Result left watts time racst
runBatt :: [String] -> Monitor String