fix battery perc variable; closes #187
This commit is contained in:
parent
bd766aa932
commit
3274879411
|
@ -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
|
||||
})
|
||||
|
||||
|
|
|
@ -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
|
||||
})
|
||||
|
||||
|
|
|
@ -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
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue