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

fix battery perc variable; closes #187

This commit is contained in:
Luke Bonham 2017-06-23 11:56:47 +02:00
parent bd766aa932
commit 3274879411
3 changed files with 5 additions and 5 deletions

View file

@ -181,7 +181,7 @@ local bat = lain.widget.bat({
perc = perc .. " plug" perc = perc .. " plug"
end end
widget:set_markup(markup.fontfg(theme.font, theme.fg_normal, bat_now.perc .. " ")) widget:set_markup(markup.fontfg(theme.font, theme.fg_normal, perc .. " "))
end end
}) })

View file

@ -156,9 +156,9 @@ theme.fs = lain.widget.fs({
-- Battery -- Battery
local bat = lain.widget.bat({ local bat = lain.widget.bat({
settings = function() settings = function()
bat_perc = bat_now.perc local perc = bat_now.perc
if bat_now.ac_status == 1 then bat_perc = "Plug" end if bat_now.ac_status == 1 then perc = "Plug" end
widget:set_markup(markup.font(theme.font, markup(gray, " Bat ") .. bat_perc .. " ")) widget:set_markup(markup.font(theme.font, markup(gray, " Bat ") .. perc .. " "))
end end
}) })

View file

@ -157,7 +157,7 @@ local bat = lain.widget.bat({
end end
baticon:set_image(theme[index]) baticon:set_image(theme[index])
battooltip:set_markup(string.format("\n%s%%, %s", bat_now.perc, bat_now.time)) battooltip:set_markup(string.format("\n%s%%, %s", perc, bat_now.time))
end end
}) })