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"
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
})

View File

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

View File

@ -157,7 +157,7 @@ local bat = lain.widget.bat({
end
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
})