From 2dd31f747895e19398ca292c0063f5ff46285a19 Mon Sep 17 00:00:00 2001 From: jao Date: Sun, 30 Jun 2019 03:53:33 +0100 Subject: Fix: only call the low battery action when not using AC --- src/Xmobar/Plugins/Monitors/Batt.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3