From 7861db85f7bfa009410a22d546b7022d04cb351c Mon Sep 17 00:00:00 2001 From: kelpine Date: Fri, 9 May 2014 11:31:37 -0500 Subject: [PATCH] Battery status fix --- rc.lua.powerarrow-darker | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index 63eb0f1..ba9d5db 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -208,7 +208,11 @@ fswidgetbg = wibox.widget.background(fswidget, "#313131") -- Battery baticon = wibox.widget.imagebox(beautiful.widget_battery) batwidget = lain.widgets.bat({ + timeout=5, settings = function() + + + if bat_now.perc == "N/A" then widget:set_markup(" AC ") baticon:set_image(beautiful.widget_ac) @@ -221,6 +225,11 @@ batwidget = lain.widgets.bat({ baticon:set_image(beautiful.widget_battery) end widget:set_markup(bat_now.perc .. "%") + + --Fix for battery charging ;) + if bat_now.status == "Charging" or bat_now.status == "Unknown" then + baticon:set_image(beautiful.widget_ac) + end end })