From 76d798d04b154657c478b580bb4729d89b0da2e7 Mon Sep 17 00:00:00 2001 From: copycat-killer Date: Thu, 27 Oct 2016 20:22:28 +0200 Subject: [PATCH] copland: bat: check if perc is number; closes #127 --- rc.lua.copland | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc.lua.copland b/rc.lua.copland index 011478e..c7b7d13 100644 --- a/rc.lua.copland +++ b/rc.lua.copland @@ -185,7 +185,7 @@ batmargin:set_top(6) batmargin:set_bottom(6) batupd = lain.widgets.bat({ settings = function() - if bat_now.status == "N/A" then return end + if bat_now.status == "N/A" or type(bat_now.perc) ~= "number" then return end if bat_now.status == "Charging" then baticon:set_image(beautiful.ac)