1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2024-12-23 03:32:30 +00:00

copland: bat: check if perc is number; closes #127

This commit is contained in:
copycat-killer 2016-10-27 20:22:28 +02:00
parent 01c10f2d93
commit 76d798d04b

View file

@ -185,7 +185,7 @@ batmargin:set_top(6)
batmargin:set_bottom(6) batmargin:set_bottom(6)
batupd = lain.widgets.bat({ batupd = lain.widgets.bat({
settings = function() 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 if bat_now.status == "Charging" then
baticon:set_image(beautiful.ac) baticon:set_image(beautiful.ac)