From 5ff41cc188e17b041eb08e572428703ee507ef60 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Fri, 3 Mar 2017 13:13:14 +0100 Subject: [PATCH] fix #165; close #166 --- themes/multicolor/theme.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/themes/multicolor/theme.lua b/themes/multicolor/theme.lua index ae63b71..68dcef2 100644 --- a/themes/multicolor/theme.lua +++ b/themes/multicolor/theme.lua @@ -175,11 +175,10 @@ local temp = lain.widget.temp({ local baticon = wibox.widget.imagebox(theme.widget_batt) local bat = lain.widget.bat({ settings = function() - if bat_now.perc ~= "N/A" then - bat_now.perc = bat_now.perc .. "%" - end + local perc = bat_now.perc ~= "N/A" and bat_now.perc .. "%" or bat_now.perc + if bat_now.ac_status == 1 then - bat_now.perc = bat_now.perc .. " plug" + perc = perc .. " plug" end widget:set_markup(markup.fontfg(theme.font, theme.fg_normal, bat_now.perc .. " "))