mirror of
https://github.com/lcpz/awesome-copycats.git
synced 2024-12-22 19:22:32 +00:00
Merge pull request #130 from imaben/bugfix
fix error when bat value is nil
This commit is contained in:
commit
4c8b1da4d0
|
@ -1,8 +1,8 @@
|
||||||
--[[
|
--[[
|
||||||
|
|
||||||
Powerarrow Darker Awesome WM config 2.0
|
Powerarrow Darker Awesome WM config 2.0
|
||||||
github.com/copycat-killer
|
github.com/copycat-killer
|
||||||
|
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
-- {{{ Required libraries
|
-- {{{ Required libraries
|
||||||
|
@ -216,9 +216,9 @@ batwidget = lain.widgets.bat({
|
||||||
widget:set_markup(" AC ")
|
widget:set_markup(" AC ")
|
||||||
baticon:set_image(beautiful.widget_ac)
|
baticon:set_image(beautiful.widget_ac)
|
||||||
return
|
return
|
||||||
elseif tonumber(bat_now.perc) <= 5 then
|
elseif not bat_now.perc and tonumber(bat_now.perc) <= 5 then
|
||||||
baticon:set_image(beautiful.widget_battery_empty)
|
baticon:set_image(beautiful.widget_battery_empty)
|
||||||
elseif tonumber(bat_now.perc) <= 15 then
|
elseif not bat_now.perc and tonumber(bat_now.perc) <= 15 then
|
||||||
baticon:set_image(beautiful.widget_battery_low)
|
baticon:set_image(beautiful.widget_battery_low)
|
||||||
else
|
else
|
||||||
baticon:set_image(beautiful.widget_battery)
|
baticon:set_image(beautiful.widget_battery)
|
||||||
|
|
Loading…
Reference in a new issue