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

Merge remote-tracking branch 'kelpine/master'

This commit is contained in:
Eric Blanchette 2014-05-09 13:31:12 -04:00
commit eddb0f2d66

View file

@ -208,7 +208,11 @@ fswidgetbg = wibox.widget.background(fswidget, "#313131")
-- Battery -- Battery
baticon = wibox.widget.imagebox(beautiful.widget_battery) baticon = wibox.widget.imagebox(beautiful.widget_battery)
batwidget = lain.widgets.bat({ batwidget = lain.widgets.bat({
timeout=5,
settings = function() settings = function()
if bat_now.perc == "N/A" then if bat_now.perc == "N/A" then
widget:set_markup(" AC ") widget:set_markup(" AC ")
baticon:set_image(beautiful.widget_ac) baticon:set_image(beautiful.widget_ac)
@ -221,6 +225,11 @@ batwidget = lain.widgets.bat({
baticon:set_image(beautiful.widget_battery) baticon:set_image(beautiful.widget_battery)
end end
widget:set_markup(bat_now.perc .. "%") 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 end
}) })