summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/Plugins/Monitors/Batt.hs
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2019-06-30 03:53:33 +0100
committerjao <jao@gnu.org>2019-06-30 03:53:33 +0100
commit2dd31f747895e19398ca292c0063f5ff46285a19 (patch)
treec0246a1aaf7c4b1347c798d6e6df4f2c6a4b30e8 /src/Xmobar/Plugins/Monitors/Batt.hs
parentf69a7ec50716191a31b79be08998d9b2adf6c9fa (diff)
downloadxmobar-2dd31f747895e19398ca292c0063f5ff46285a19.tar.gz
xmobar-2dd31f747895e19398ca292c0063f5ff46285a19.tar.bz2
Fix: only call the low battery action when not using AC
Diffstat (limited to 'src/Xmobar/Plugins/Monitors/Batt.hs')
-rw-r--r--src/Xmobar/Plugins/Monitors/Batt.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Xmobar/Plugins/Monitors/Batt.hs b/src/Xmobar/Plugins/Monitors/Batt.hs
index 9ce0dca..292054e 100644
--- a/src/Xmobar/Plugins/Monitors/Batt.hs
+++ b/src/Xmobar/Plugins/Monitors/Batt.hs
@@ -208,7 +208,7 @@ readBatteries opts bfs =
| time == 0 = Idle
| ac = Charging
| otherwise = Discharging
- maybeAlert opts left
+ when (not ac) (maybeAlert opts left)
return $ if isNaN left then NA else Result left watts time racst
runBatt :: [String] -> Monitor String