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

Modify the battery display

Use the icon ac when ac is connected.
If ac is not conneted, battery should be present.
If ac is connected and battery is not present, use the icon ac and the
text N/A
This commit is contained in:
sandnon 2013-10-07 16:15:51 +08:00
parent 6068f6ae7e
commit 138c158c3a
2 changed files with 2 additions and 3 deletions

2
lain

@ -1 +1 @@
Subproject commit e72deb9de709a9adaa3a239a4e18ed641538de6e
Subproject commit c4879b5932e770ed9de37bee2818554460b68d76

View file

@ -200,8 +200,7 @@ fswidgetbg = wibox.widget.background(fswidget, "#313131")
baticon = wibox.widget.imagebox(beautiful.widget_battery)
batwidget = lain.widgets.bat({
settings = function()
if bat_now.perc == "N/A" then
bat_now.perc = "AC"
if bat_now.ac == "online" then
baticon:set_image(beautiful.widget_ac)
elseif tonumber(bat_now.perc) <= 5 then
baticon:set_image(beautiful.widget_battery_empty)