From 0ecfb69ab1bbbd3d1a5cd4f43df43f379546da39 Mon Sep 17 00:00:00 2001 From: Luca CPZ Date: Wed, 25 Jul 2018 12:45:34 +0200 Subject: [PATCH] lain: new commit --- lain | 2 +- themes/copland/theme.lua | 2 +- themes/holo/theme.lua | 2 -- themes/powerarrow-dark/theme.lua | 2 +- themes/powerarrow/theme.lua | 2 +- themes/steamburn/theme.lua | 2 +- 6 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lain b/lain index a4c86f9..89ae530 160000 --- a/lain +++ b/lain @@ -1 +1 @@ -Subproject commit a4c86f9ace9dc5caad4f942af5d1be3eca47f666 +Subproject commit 89ae5308061ac828b4f5002ba77c069585b1e088 diff --git a/themes/copland/theme.lua b/themes/copland/theme.lua index 1456e8c..bb1e0d4 100644 --- a/themes/copland/theme.lua +++ b/themes/copland/theme.lua @@ -168,7 +168,7 @@ local batbar = wibox.widget { } local batupd = lain.widget.bat({ settings = function() - if bat_now.status == "N/A" or type(bat_now.perc) ~= "number" then return end + if (not bat_now.status) or bat_now.status == "N/A" or type(bat_now.perc) ~= "number" then return end if bat_now.status == "Charging" then baticon:set_image(theme.ac) diff --git a/themes/holo/theme.lua b/themes/holo/theme.lua index 8f98008..55a2a84 100644 --- a/themes/holo/theme.lua +++ b/themes/holo/theme.lua @@ -201,7 +201,6 @@ function () end))) -- Battery ---[[ local bat = lain.widget.bat({ settings = function() bat_header = " Bat " @@ -212,7 +211,6 @@ local bat = lain.widget.bat({ widget:set_markup(markup.font(theme.font, markup(blue, bat_header) .. bat_p)) end }) ---]] -- fs theme.fs = lain.widget.fs({ diff --git a/themes/powerarrow-dark/theme.lua b/themes/powerarrow-dark/theme.lua index af89380..e5b4c9e 100644 --- a/themes/powerarrow-dark/theme.lua +++ b/themes/powerarrow-dark/theme.lua @@ -203,7 +203,7 @@ theme.fs = lain.widget.fs({ local baticon = wibox.widget.imagebox(theme.widget_battery) local bat = lain.widget.bat({ settings = function() - if bat_now.status ~= "N/A" then + if bat_now.status and bat_now.status ~= "N/A" then if bat_now.ac_status == 1 then widget:set_markup(markup.font(theme.font, " AC ")) baticon:set_image(theme.widget_ac) diff --git a/themes/powerarrow/theme.lua b/themes/powerarrow/theme.lua index 185d922..f68e11a 100644 --- a/themes/powerarrow/theme.lua +++ b/themes/powerarrow/theme.lua @@ -240,7 +240,7 @@ theme.fs = lain.widget.fs({ local baticon = wibox.widget.imagebox(theme.widget_battery) local bat = lain.widget.bat({ settings = function() - if bat_now.status ~= "N/A" then + if bat_now.status and bat_now.status ~= "N/A" then if bat_now.ac_status == 1 then widget:set_markup(markup.font(theme.font, " AC ")) baticon:set_image(theme.widget_ac) diff --git a/themes/steamburn/theme.lua b/themes/steamburn/theme.lua index 20073a9..8385f1c 100644 --- a/themes/steamburn/theme.lua +++ b/themes/steamburn/theme.lua @@ -157,7 +157,7 @@ theme.fs = lain.widget.fs({ local bat = lain.widget.bat({ settings = function() local perc = bat_now.perc - if bat_now.ac_status == 1 then perc = "Plug" end + if bat_now.ac_status == 1 then perc = perc .. " Plug" end widget:set_markup(markup.font(theme.font, markup(gray, " Bat ") .. perc .. " ")) end })