mirror of
https://github.com/lcpz/awesome-copycats.git
synced 2024-12-22 19:22:32 +00:00
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"
|
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
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue