diff --git a/themes/multicolor/theme.lua b/themes/multicolor/theme.lua index fff376e..2642a5e 100644 --- a/themes/multicolor/theme.lua +++ b/themes/multicolor/theme.lua @@ -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 }) diff --git a/themes/steamburn/theme.lua b/themes/steamburn/theme.lua index 10309d5..40c7d52 100644 --- a/themes/steamburn/theme.lua +++ b/themes/steamburn/theme.lua @@ -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 }) diff --git a/themes/vertex/theme.lua b/themes/vertex/theme.lua index c073454..5746bcd 100644 --- a/themes/vertex/theme.lua +++ b/themes/vertex/theme.lua @@ -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 })